Using VBA code to create a command bar entry to open a form

J

Jonathan Blitz

I have VBA to that creates a command bar and the buttons on the bar.

I have no problem getting it to run a macro or a function (using the
onaction property).
However, I cannot get it to open a form.
What parameters do I need to set when I create the button so that it can
open a form directly.

I compared it to one that I created "by hand" and I can't see any difference
so it must be some hidden value somewhere.

I suppose I could run a macro to do it but that would be very ugly.

Any ideas?


--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
M

MacDermott

The only option I know of besides having it run a macro to open the form
would be to have it run a custom function (in a standard module) to open the
form.
Ugly?
It works!

- Turtle
 

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