Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created a template (1st workbook) with code, and then tried to copy it to a
workbook (2nd workbook) that has sheets that I want to analyze. I right-clicked the sheet tab, and then left-clicked on €˜Move Selected Sheets To Book and then clicked the check box that says €˜Create a Copy. I did this a couple of times and it seemed like the analysis was done correctly on the on the 2nd workbook. However, the code remains in the module of the 1st workbook. Now, the macros dont seem to be working correctly, I guess because all macros are still in the 1st workbook. I tried to copy/paste all the code into a Class Module, and then I couldnt assign the control button to the macro. Confused? I am!! My questions are as follows: is there a way to get the code to transfer to the 2nd workbook €˜Move or Copy & €˜Create a Copy technique that I described above. Also, how do Class Modules work? Finally, why cant I assign a control button to a class module? TIA, Ryan-- -- RyGuy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don't use a class module. It has nothing to do with what you are doing
http://www.cpearson.com/excel/vbe.htm has the code to work with modules. -- Regards, Tom Ogilvy "ryguy7272" wrote: I created a template (1st workbook) with code, and then tried to copy it to a workbook (2nd workbook) that has sheets that I want to analyze. I right-clicked the sheet tab, and then left-clicked on €˜Move Selected Sheets To Book and then clicked the check box that says €˜Create a Copy. I did this a couple of times and it seemed like the analysis was done correctly on the on the 2nd workbook. However, the code remains in the module of the 1st workbook. Now, the macros dont seem to be working correctly, I guess because all macros are still in the 1st workbook. I tried to copy/paste all the code into a Class Module, and then I couldnt assign the control button to the macro. Confused? I am!! My questions are as follows: is there a way to get the code to transfer to the 2nd workbook €˜Move or Copy & €˜Create a Copy technique that I described above. Also, how do Class Modules work? Finally, why cant I assign a control button to a class module? TIA, Ryan-- -- RyGuy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CLASS MODULE & SIMPLE MODULE | Excel Discussion (Misc queries) | |||
Copy Sheet Object Module | Excel Programming | |||
Class Module? | Excel Programming | |||
Class module | Excel Programming | |||
Variable from a sheet module in a class module in XL XP | Excel Programming |