run code from menu

  • Thread starter Thread starter Jesper F
  • Start date Start date
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
 
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.
 
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.
 
Back
Top