Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Neal Z |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Vartype() and vbObject | Excel Programming | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Passing variable to VarType of other Variable | Excel Programming | |||
Question about VarType | Excel Programming |