View Single Post
 
Old 01-16-2015, 01:16 PM
dangal333 dangal333 is offline Windows 8 Office 2013
Novice
 
Join Date: Jan 2015
Posts: 3
dangal333 is on a distinguished road
Exclamation Word VBA Macro Implementation - Please Help

Hello,

I have a problem with executing VBA modules that are associated to a button in the ribbon (or quick access toolbar).

I have developed two VBA Word modules: "VBAMod1" and "VBAMod2"
I have both of these VBA modules saved as .bas files.

Here are the steps I took:
1. Open Visual Basic Editor (alt + F11) in Word
2. Right Click "Normal" & import file > "VBAMod1" (this imported to global doc)
3. Do step 2, but import file "VBAMod2" (this imported to global doc)

Now I have my two VBA modules accessible globally (to tie to a button, as desired).

When I go to Word Options > Customize Ribbon, I created a new "tab". I selected "Macros" on the right and have added my first and second macros to this new tab (making them executable buttons on this tab in my Word ribbon).

When I try to use these two buttons (which execute two seperate modules), both buttons on this new tab of my ribbon execute only ONE module, regardless of what button was clicked.

Does anyone know why it executes the WRONG module?
Reply With Quote