View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Edward Ulle Edward Ulle is offline
external usenet poster
 
Posts: 92
Default Test for an empty selection

My macro creates new shapes on the worksheet.

I want to group them but if no shapes were created the macro fails.

How do I test for valid selection.

I have tied:

If Not Selection Is Nothing Then Selection.ShapeRange.Group

If Not Selection.ShapeRange Is Nothing Then Selection....

But nothing works. It says "Object doesn't support this property or
method"

Thanks


*** Sent via Developersdex http://www.developersdex.com ***