EXCEL VBAメモ - オブジェクトの情報
Dim str As String, rng As Range, obj As Object, var As Variant MsgBox TypeName(str) 'String MsgBox TypeName(rng) 'Nothing MsgBox TypeName(obj) 'Nothing MsgBox TypeName(var) 'Empty Set rng = Range("A1") Set obj = CreateObject("Excel.Application") var = 1 MsgBox TypeName(rng) 'Range MsgBox TypeName(obj) 'Application MsgBox TypeName(var) 'Integer var = Null MsgBox TypeName(var) 'Null