Dave T
08-11-2010, 08:51 PM
Hello All,
I have been trying to work through the last part of an article from the Word.mvps site called "Organizing your macros" http://www.word.mvps.org/FAQs/MacrosVBA/OrganizeMacros.htm.
Just when I think I have done everything right and run the ShowGlobalTemplates UserForm I get the following error:
Compile error:
Member already exists in an object module from which this object module derives
If anyone can explain where I have gone wrong or what I have missed it would be greatly appreciated.
I did the following:
Created the UserForm and named it frmGlobal and used the caption name of "Load Global Template"
Created the Frame and labelled the caption as "Select Templates to Load"
Created the 3 OptionButtons and respectively named them optWordMcr, optMacros and optSupport
Created the OK OptionButton and named it cmdOK_Click and caption of OK
Created the Cancel OptionButton and named it cmdCancel_Click and caption of Cancel
Created a standard Module and copied the code and pasted it in the module
Copied and pasted the UserForm code in the UserForm
To run the macro I went Tools > Macro > Macros and selected Run on the ShowGlobalTemplates and the error message comes up.What have I done wrong or what have I missed ???
I have been using to following code to load / unload a single add-in, however I was just curious about the UserForm method shown as it can load more than one add-in.
Sub ActivateMyMacros()
AddIns("C:\Program Files\Microsoft Office\OFFICE11\STARTUP\MyMacros.dot"). _
Installed = Not AddIns("C:\Program Files\Microsoft Office\OFFICE11\STARTUP\MyMacros.dot").Installed
End Sub
Just out of curiosity what methods (and code examples please) do other people use to manage loading and unloading their add-ins ???
Regards,
Dave T
Word 2003
I have been trying to work through the last part of an article from the Word.mvps site called "Organizing your macros" http://www.word.mvps.org/FAQs/MacrosVBA/OrganizeMacros.htm.
Just when I think I have done everything right and run the ShowGlobalTemplates UserForm I get the following error:
Compile error:
Member already exists in an object module from which this object module derives
If anyone can explain where I have gone wrong or what I have missed it would be greatly appreciated.
I did the following:
Created the UserForm and named it frmGlobal and used the caption name of "Load Global Template"
Created the Frame and labelled the caption as "Select Templates to Load"
Created the 3 OptionButtons and respectively named them optWordMcr, optMacros and optSupport
Created the OK OptionButton and named it cmdOK_Click and caption of OK
Created the Cancel OptionButton and named it cmdCancel_Click and caption of Cancel
Created a standard Module and copied the code and pasted it in the module
Copied and pasted the UserForm code in the UserForm
To run the macro I went Tools > Macro > Macros and selected Run on the ShowGlobalTemplates and the error message comes up.What have I done wrong or what have I missed ???
I have been using to following code to load / unload a single add-in, however I was just curious about the UserForm method shown as it can load more than one add-in.
Sub ActivateMyMacros()
AddIns("C:\Program Files\Microsoft Office\OFFICE11\STARTUP\MyMacros.dot"). _
Installed = Not AddIns("C:\Program Files\Microsoft Office\OFFICE11\STARTUP\MyMacros.dot").Installed
End Sub
Just out of curiosity what methods (and code examples please) do other people use to manage loading and unloading their add-ins ???
Regards,
Dave T
Word 2003