assigning a macro to a command button

S

Steve

I am attempting to assign a macro to a command button I
have inserted in my worksheet. The online help in the
program says to right click on the button and choose
the, "assign macro" option from the shortcut menu. The
problem is that the "assign macro" option does not appear
on the shortcut menu. How do I get around this? I am
also having trouble running a macro as it always tells me
they are not enabled because of the security level
is "high". It still does this after I change the level to
low.

Thank you
 
C

Chris Leonard

Try right clicking the button and view code, then add a call to the macro in
the click event e.g. call Macro1

Set your security to medium, close Excel, reopen it or reload the sheet. You
cannot set the security and have it work without a reload of the sheet or
Excel.
 
K

kari

hi

the online program is right, you should see an "asign
macro" option. the only thing i can think is that you
are not in "design mode". in the visual basics toolbar,
click the buttong that has a tourqouise triangle and a
pencil, then try right clicking on the command button
again.

as for the security level, you should be able to get
around that by "signing" the macro. go the the help menu
and type "add signature to macro". that should help you
out

kari
 
D

DME

I have had the same problems. Here is what I have done.
Do a view -tooldbars - Forms and add the Command Button from the Forms tool
bar. Right click on the command button there and Assign Macro Should show
up.

Craig
 

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

Top