Word 2007-Macros don't run from Quick Access Toolbar

S

sek0910

I recorded a macro that opens a document in my My Documents Folder
When I created the macro, I assigned a button to it which appears on my
Quick Access Toolbar.
When I run the maco from Visual Basic Window, it runs OK
when I run it from the the Macros Window that opens when I click on the
Macros icon in the menu, the macro runs ok
BUT when I click on the associated button on the Quick Access Toolbar, a
small window opens with the title "Microsoft Visual Basic" and displays an X
in a red circle with no explanatory text and an "OK" and "Help" button. When
I press OK, the window closes and nothing happens. Clicking on the Help
button merely opens a generic help window.

Any suggestions? Also, once a macro is written and assigned to a button or
hotkey, how do you change the macro name and/or button or hotkey?

Thanks,
Steve
 
G

Graham Mayor

There is no reason why a macro cannot be run from a button on the QAT
(provided it is available to the document).
Click the little arrow at the right end of the QAT and select 'More
Commands'
Choose commands from Macros
Pick your macro from the list and click 'Add'
Select the macro in the right Window and select 'Modify' which appears when
the tool is selected.
Choose an icon from the limited selection and if necessary change the
display name in the box underneath the icons.
Click OK twice and your button is on the QAT and should run the selected
macro. The tooltip should give the display name you selected.
If you change the macro name in the vba editor you would have to remove the
command from the QAT and add it again - just as in previous versions.
Keyboard shortcuts are assigned and re-assigned from the Customize button at
the bottom of the QAT editing window.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

sek0910

Thanks, but that didn't solve the problem. A small info window still pops up
with the title "Microsoft Visual Basic" with the white x in the red circle
and no explanation!

I am assuming there is some incompatibility with Word2007 and some other
program, etc. on my computer so just that one function doesn't work???


Thanks,
steve
 

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