View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Application.Selection Is Range?

Use the TypeOf operator. E.g.,

If TypeOf Selection Is Excel.Range Then
Debug.Print "range"
Else
Debug.Print TypeName(Selection)
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Jeff Higgins" wrote in
message
...
How can I determine if the Application.Selection is a Range
type object?
Is there a way test way to test like this:

If Application.Selection Is Range Then
'Then do some thing with the range.
End If