View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Compare shapes for obtaining a value

Hi Mihai,
I've found out the cause of the error.
Excel includes in the Sheet's Shapes collection the Drop Down arrow
belonging to the AutoFilter and this does not have a TopLeftCell
property, so it looks like a safer solution would be to detect such a
shape so that the loop can then skip to the next shape.
So, what you could do is delete the line with "On Error Resume Next",
add the following line so that it is the next line immediately after
the "For Each Shp in etc" line..

If Left(Shp.Name,9) < "Drop Down" Then

Then add another "End If" line so that it is the line immediately
before the "Next Shp" line.

Hope that all makes sense.

Ken Johnson