Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Right-Click Sheet, Move or Copy, & Class Module

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Right-Click Sheet, Move or Copy, & Class Module

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
Copy Sheet Object Module Filo Excel Programming 2 May 23rd 07 04:26 AM
Class Module? steve Excel Programming 5 August 24th 06 02:35 PM
Class module Mark[_36_] Excel Programming 2 February 17th 04 03:14 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"