Problem calling macro from menu bar...

A

Alex

Excel helper

I have added a menu to the worksheet menu bar and on that menu I have some
items that when selected call a macro.

I have used the standard code to set up my menu items...

With MyMenu
.Caption = "Click here"
.FaceId = 490
.OnAction = "MyMacro"
End with

My probkem is that when I select the appropriate maenu item I get a messgae
box telling me that my macro cannot be found. Any ideas why this may be the
case?

The code for MyMacro is ina standard module of that workbook. I have tried:

(1) Making the procedure Public from Private - didn't work
(2) I changed the .OnAction to .OnAction = "MyCode.MyMacro" to reflect the
name of the module in which it is held - didn't work

What am I missing? Even worse, when I first set it up it worked ok but now
stubbornly refuses to cooperate.

Any pointers greatly received,

Regards


Alex
 

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