N Neil Bhandar Jan 16, 2004 #1 How do I verify if I have selected an object other than a cell or a range of cells? Can any one pls help. Thanks, -Neil
How do I verify if I have selected an object other than a cell or a range of cells? Can any one pls help. Thanks, -Neil
P pikus Jan 16, 2004 #2 If it is only one or if it many cells, the code is the same: var1 = TypeName(Selection) If var1 <> "Range" Then DoStuff Else DontDoStuff End If - Piku
If it is only one or if it many cells, the code is the same: var1 = TypeName(Selection) If var1 <> "Range" Then DoStuff Else DontDoStuff End If - Piku
D David Jan 17, 2004 #3 Not sure if this will work or help. NameType(activeobject) If you can stop the code where you want this might help in the immediate window.
Not sure if this will work or help. NameType(activeobject) If you can stop the code where you want this might help in the immediate window.
R Rob van Gelder Jan 17, 2004 #4 Neil, Sub testit() If Not TypeOf Selection Is Range Then MsgBox "Selection is not a range" End Sub Rob
Neil, Sub testit() If Not TypeOf Selection Is Range Then MsgBox "Selection is not a range" End Sub Rob