Prompt user to select a shape
If you mean by click the shape. We will use two macros:
Sub pic_click()
MsgBox (Application.Caller)
'do something else
End Sub
Sub tell_user()
MsgBox ("please click on a shape")
End Sub
Both macros go in standard modules. Right-click all the shapes and Assign
Macro...
All shapes are to be assigned the pic_click macro
1. first run tell_user. The user will first click the ok button and then
click on a shape
2. this causes the pic_click macro to run. Application.Caller tells the
user (and your VBA) exactly which shape was clicked.
Putting macros on Shapes is just as effective as putting them on Buttons and
a lot more fun!
--
Gary''s Student - gsnu2007k
"MM User" wrote:
Apologies but I need the user to actually select the shape not enter the
name - is this possible?
thanks
"Gary''s Student" wrote in message
...
Sub shapepicker()
x = Application.InputBox(prompt:="enter the shape name: ", Type:=2)
ActiveSheet.Shapes(x).Select
End Sub
The user would enter something like Oval 1
--
Gary''s Student - gsnu200800
"MM User" wrote:
Hi,
You can use the InputBox to prompt the user to enter some text or range -
is
it possible to also prompt the user to select a shape?
Thanks
|