Right-Click Sheet, Move or Copy, & Class Module

G

Guest

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 don’t 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 couldn’t 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 can’t I assign a control button to a class module?

TIA,
Ryan--
 

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