View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Understanding Selection "Type"


TypeName is what you're after:

Sub test()
MsgBox TypeName(Selection)
End Sub

Another way is:
If TypeOf Selection Is Rectangle Then MsgBox "Selection is a Rectangle"


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"MWE " wrote in message
...
How can one determined what "type" of selection has been made? Since a
selection could be a range, a shape, a chartobject, etc., how do you
know which type and how can you determine which particular instance of
that type?

Thanks


---
Message posted from http://www.ExcelForum.com/