Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2008

Tip: Looking for answers? Try searching our database.

how to identify a shape as a picture in excel from VB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Uwe - 19 Jan 2008 15:03 GMT
I have 600+ shapes in a spreadsheet. Half are the little red corner
associated with comments and half are small pictures in the same cell. How
can I select the picture in a given cell from VB?
Signature

Thanks,
Uwe

Dave Peterson - 19 Jan 2008 17:05 GMT
Hovering over some row or hovering over some cell?

> I have 600+ shapes in a spreadsheet. Half are the little red corner
> associated with comments and half are small pictures in the same cell. How
> can I select the picture in a given cell from VB?
> --
> Thanks,
> Uwe

Signature

Dave Peterson

Ken Johnson - 19 Jan 2008 23:23 GMT
You could use the shape's name to distinguish Comment from other
shapes.
The following example selects the first shape in F2 whose name does
not start with "Comment"...

Option Explicit
Sub select_shape()
Dim Shp As Shape
For Each Shp In ActiveSheet.Shapes
If Shp.TopLeftCell = Range("F2") _
And Left(Shp.Name, 7) <> "Comment" Then
Shp.Select
End If
Next
End Sub

Ken Johnson
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.