Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi-
I have a macro file that opens along with another file and the macro is run against the file. I copy a bunch of buttons from the macro file to the new file and currently have all of the code in the macro file as a place to store it. The problem I am having is the buttons reference the modules in the macro file. So when the macro file is closed and you press the buttons in the new file that is created from the macro....it errors out. How can I get the code that is stored in this macro file into modules in the new file that is created so that I don't have to keep the macro file open in order to use the buttons? TIA, Chris |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check out this link...
http://www.cpearson.com/excel/vbe.htm -- HTH... Jim Thomlinson " wrote: Hi- I have a macro file that opens along with another file and the macro is run against the file. I copy a bunch of buttons from the macro file to the new file and currently have all of the code in the macro file as a place to store it. The problem I am having is the buttons reference the modules in the macro file. So when the macro file is closed and you press the buttons in the new file that is created from the macro....it errors out. How can I get the code that is stored in this macro file into modules in the new file that is created so that I don't have to keep the macro file open in order to use the buttons? TIA, Chris |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
when you copy the buttons over, then reassign the onaction property of the
buttons to reference the workbook in which you placed them. -- Regards, Tom Ogilvy wrote in message oups.com... Hi- I have a macro file that opens along with another file and the macro is run against the file. I copy a bunch of buttons from the macro file to the new file and currently have all of the code in the macro file as a place to store it. The problem I am having is the buttons reference the modules in the macro file. So when the macro file is closed and you press the buttons in the new file that is created from the macro....it errors out. How can I get the code that is stored in this macro file into modules in the new file that is created so that I don't have to keep the macro file open in order to use the buttons? TIA, Chris |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom-
Anyway you can give me a quick rundown of how to do the above? Much appreciated! -Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy vb module in all excel sheets | Excel Discussion (Misc queries) | |||
Module not file when open the excel file | Excel Discussion (Misc queries) | |||
How do I copy a new module to 200 workbooks with a macro? | Excel Programming | |||
Copy a code module | Excel Programming | |||
Is it possible to copy a code module using VBA? | Excel Programming |