run code from menu

J

Jesper F

I'm building menu bar. Can run some code from a menu item without opening af
form?
Just run say a function when clicking the item?

Jesper
 
R

Rick Brandt

Jesper said:
I'm building menu bar. Can run some code from a menu item without
opening af form?
Just run say a function when clicking the item?

Jesper

Enter...

=FunctionName()

....in the OnActionproperty of the menu item. It has to be a function or a
macro, not a sub.
 
P

PC Datasheet

Further ------

FunctionName() can be in a form's module if the form will be open when you
run the function. Otherwise, you will need to put FunctionName() in a
standard module.
 

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