Hi all,
How do I create a button to run a macro in MS Word that is not on the tool bar but is on the page.
I used the control toolbox option to draw a command button which I created just like using excel really but when I right clicked it does not give the option to assign a macro
How do I attach a macro to this command button or is there a different button or can I assign a Marco to or an image so when you click the image it runs the macro?
What ever is easier really.
Any help would be appreciated thank you.
Last edited by garethtaylor; 12-11-2009 at 05:32 AM.
Hi,
In Excel you have the Control Toolbar buttons and the Forms toolbar buttons. The latter allows you to right click and assign a macro to the button.
In Word, the Forms Toolbar does not offer a button, so there's no right click option to assign a macro.
If you use the Control toolbar button, you'll need to enable design mode (click on the icon with the ruler and pencil on the Control Toolbar, then double click the button. This will open up the VBE with the button sub activated. Post your code into that sub or simply call the sub you've already created.
hth
teylyn
Microsoft MVP - Excel
At Excelforum, you can say "Thank you!" by clicking theicon below the post.
Avoid pie charts with more than two data points. Why? See here (pdf, 559 kb). The only acceptable pie chart is here.
thank you i had already done it then just needed to unclick that ruler button thankyou for the help
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks