How do I call a menu command in VBA?

odin1701

Registered User.
Local time
Yesterday, 23:42
Joined
Dec 6, 2006
Messages
526
I need to use the File > Export menu item in a database, but I need to specify that menu item in code.

I have the default menus disabled so even copying the Export menu item to my custom toolbar - it is not visible when the DB is opened.

I know there is a way to pick menu items, but I don't know the number for that option, etc.
 
Simple Software Solutions

Hi

I Did this a few years ago and from what I remember you had to reference the menu items in a similiar way that Access does. Remembering that the File Menu = 0 and Export = 3

Try and create a macro do do what you want to do then convert the macro to VBA.

If I can find out the code I will post it here. The reason I used it was to disable/enable Custom menu items.


Have a look at this link:[URL="http://support.microsoft.com/kb/202308/en-us"/URL]CodeMaster::cool:
 
Last edited:
but if you cant see the menu, and you want to replicate the function then surely its better to use the relevant mrthod of either

docmd

or

runcommand objects
 

Users who are viewing this thread

Back
Top Bottom