Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a Macro off a command button in MS Word

Status
Not open for further replies.

Sandman007

Programmer
Jun 20, 2001
47
US
I created a macro in Word.
I created a command button to run the macro.
My code is not working. Any suggestions?

Private Sub CommandButton1_Click()
DoCmd.RunMacro (macroname)
End Sub

 
Try this

click the "View" Menu
then "tool bars"
then "Customize"
click the "toolbars" TAB at the top of that box
click "New" button
give it a name
you should see a toolbar with no buttons in it.

Then click the "commands" TAB at the top
In the left hand list find "macros" (near the bottom)
In the right list you should see your macro
click and Drag it to the new toolbar you just made.
you will know it's in there when you see a | line in the toolbar, let go of the mouse button and you should see a little button.
Right click on the button to change the icon or give it a name.

OK
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top