Toolbar comand

G

Guest

Hello.
I have a button in a form which prints the record in use by clicking on it.
I wrote some code to do that.
However, I would like to replace that button by one comand in a toolbar
attached to that form.
Can anybody tell me how can I do that?
Thank you in advance.
Regards.
Acores
 
J

J. Goddard

You can customize and create toolbars by right-clicking on a toolbar,
and selecting "customize..."

John
 
G

Guest

Hello, J. Goddard. Thank you for your quick answer.
However, I already created the toolbar; my difficulty is the following: I
wrote a click procedure for a button which prints the current form; this
button is IN the form.
But I would like to delete that button and have that print procedure in the
toolbar.
I already tried to create a macro that execute that code, and putted that
macro in the toolbar, but it didn't work.
Am I doing something wrong?
Thank you again.
Acores



"J. Goddard" escreveu:
 
J

J. Goddard

I don't know how you put the macro in the toolbar, but try this:

Right click in any visible toolbar, then click "Customize"
Make you toolbar visible
Right-click the toolbar button you want to use; select "properties from
the dropdown
Enter the name of the macro in the "On Action" box.
(I don't use macros, so I have never tried that)

You can also put your code in a function (not a Sub), and call the
Function using =functionname() in the On Action box.

John
 

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