How do I get the AutoShape name using mouse in Excel?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I get the AutoShape Name (As shown on the Name Box) by using only
mouse click? I would like to insert a lot of object, then mouse click to
delete one, and it can be any 1 of 100 object that i have inserted.
I have difficulty in getting the AutoShape/Object name by using code.
What I actually trying to do is like 'right click' on the object then
'select cut'. but I would like to do it with a single mouse click. Perhape
insert an macro will be good, but again, I have difficutlly selecting the
object name.
Could anyone help?
 
Yumi,

I'm not sure I understand your question. The following code will give the
name of the selected autoshape:

MsgBox Selection.Name

You need a way to fire the macro after the autoshape has been selected.
Perhaps a shortcut key (Tools - Macro - Macros - Options).
 
If you're deleting a lot--but not all objects on a worksheet.

Tools|Customize|Commands Tab|Drawing category

Drag "Select Multiple Objects"
to your favorite toolbar (or even create a new toolbar)

Then use that to select the ones you want.
Then dismiss the dialog and hit the Delete key on the keyboard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top