Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing an AutoShape in Excel

Status
Not open for further replies.

DreamerZ

Programmer
Jul 11, 2001
254
US
I would like to capture when an autoshape like a star is created in Excel.

The TypeName() works for lines, rectangles, etc., but not for Autoshapes. I thought I could use:

If TypeName(Selection) = "Autoshape"...but it returns always false.

So, I tried MsgBox TypeName(Selection) and on any AutoShape, "Rectangle" was returned. Well, a star is not a rectangle. The above MsgBox returns line correctly when a line is selected.

What else can I try to capture an autoshape. While the rectangle return is okay, a star is not a rectangle and I could capture and rectangle instead of the autoshape.

Thoughts? TIA.

DreamerZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top