N
Neal Zimm
Hi All,
I don't understand why in the second MsgBox
the vartype displays as 0 when vTest appears to
be initialized with the right values.
Thanks,
Neal Z.
Sub Test()
Dim vTest As Variant
Set vTest = ActiveSheet
MsgBox VarType(vTest) & " =vartype", , TypeName(vTest)
' vartype shows 9 for object Worksheet
Set vTest = ActiveSheet.Range("b10")
MsgBox VarType(vTest) & " =vartype" _
& vbCr & vTest.Worksheet.Name _
& vbCr & vTest.Address, , TypeName(vTest)
' vartype shows 0 ?, mso docum says uninitialized
' yet the sheet name and address show OK ??
' TypeName shows Range
End Sub
I don't understand why in the second MsgBox
the vartype displays as 0 when vTest appears to
be initialized with the right values.
Thanks,
Neal Z.
Sub Test()
Dim vTest As Variant
Set vTest = ActiveSheet
MsgBox VarType(vTest) & " =vartype", , TypeName(vTest)
' vartype shows 9 for object Worksheet
Set vTest = ActiveSheet.Range("b10")
MsgBox VarType(vTest) & " =vartype" _
& vbCr & vTest.Worksheet.Name _
& vbCr & vTest.Address, , TypeName(vTest)
' vartype shows 0 ?, mso docum says uninitialized
' yet the sheet name and address show OK ??
' TypeName shows Range
End Sub