SELECT obj.type, obj.name, mdl.definition
FROM sys.sql_modules AS mdl
INNER JOIN sys.objects AS obj
ON mdl.object_id = obj.object_id
WHERE mdl.definition LIKE '%order%'
ORDER BY obj.type, obj.name;
Dim ws As Worksheet
Dim shp As Shape
Set ws = Thisworkbook.Worksheets("Sheet1")
Set shp = ws.Shapes("SHP1").Duplicate
With shp
.Top = ws.Range("B2").Top - .Height -5
.Left = ws.Range("B2").Left + (ws.Range("B2").Width - .Width) / 2
.Name = "SUB_SHP1"
.Visible = msoTrue
.OnAction = "RunXXX"
End With
Set shp = Nothing
Set ws = Nothing
Function CheckNumber(v as Varient) As Boolean
CheckNumber = True
If Len(v)=0 Then Exit Function
If IsNumeric(v) Then Exit Function
CheckNumber = False
End Function
とか記載したら、vに「a」とか入れてもTrueで返ってきてしまった。
Function CheckNumber(v as Varient) As Boolean
CheckNumber = True
If Len(Cstr(v))=0 Then Exit Function
If IsNumeric(Cstr(v)) Then
If InStr(Cstr(v),".")=0 Then Exit Function '小数じゃなかったら(簡易チェック)
End If
CheckNumber = False
End Function