PC Review


Reply
Thread Tools Rate Thread

COPY MODULE MACRO WITH WORKSHEET TO OTHER WORKBOOKS

 
 
K
Guest
Posts: n/a
 
      19th Feb 2008
Hi, I have macro setup on a button in one of my worksheet. Lots of
other people also have
to use that worksheet for their work purpose. But to use that
worksheet they need to
copy that worksheet into their workbooks or Excel Files and the best
way to copy that
worksheet (with which they can get all the formulas and other formats)
is to right click
on that worksheet tab and click "Move or Copy" comand to transfer it
to their workbooks.
The problem is that when they get copy of my worksheet in their
workbooks or files and
when they click that button in which the macro is setup to work then
by clicking that
button it openes up the original worksheet aswell. I want someway
that when they copy
my worksheet into their workbooks then they should also get the macro
to be copied
aswell. I know the copy method I mentioned above will copy the
worksheet macro
but how to copy the Module macro. Please if anybody can help in
this. Thanks
 
Reply With Quote
 
 
 
 
dan dungan
Guest
Posts: n/a
 
      19th Feb 2008
Hi,

Please show the macro code so we can see what may be causing your
problem.

Dan
 
Reply With Quote
 
paul.robinson@it-tallaght.ie
Guest
Posts: n/a
 
      19th Feb 2008
Hi
Other people should copy the workbook, not the worksheet. The code is
part of the workbook, not the worksheet.
When you copy the worksheet, the macro name "test" in workbook
"myworkbook.xls" on drive "I:\" becomes "I:\myworkbook.xls!test" in
the workbook where the sheet is copied. Hence the macro has to open
your workbook to run.
regards
Paul
On Feb 19, 4:44*pm, K <kamranr1...@yahoo.co.uk> wrote:
> Hi, I have macro setup on a button in one of my worksheet. Lots of
> other people also have
> to use that worksheet for their work purpose. *But to use that
> worksheet they need to
> copy that worksheet into their workbooks or Excel Files and the best
> way to copy that
> worksheet (with which they can get all the formulas and other formats)
> is to right click
> on that worksheet tab and click "Move or Copy" comand to transfer it
> to their workbooks.
> The problem is that when they get copy of my worksheet in their
> workbooks or files and
> when they click that button in which the macro is setup to work then
> by clicking that
> button it openes up the original worksheet aswell. *I want someway
> that when they copy
> my worksheet into their workbooks then they should also get the macro
> to be copied
> aswell. *I know the copy method I mentioned above will copy the
> worksheet macro
> but how to copy the Module macro. *Please if anybody can help in
> this. *Thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Workbooks and Copy Template Worksheet to those Workbooks K Microsoft Excel Programming 13 26th Jul 2009 09:29 AM
copy data from many workbooks to one worksheet =?Utf-8?B?bWF0dHkgcmF0YWZhaXJ5?= Microsoft Access 1 30th Jun 2007 08:40 PM
Can VBA copy all procedures from one worksheet module to another? =?Utf-8?B?SmF5?= Microsoft Excel Programming 2 28th Mar 2007 02:45 AM
Copy Multiple Workbooks to Worksheet Darrell Lankford Microsoft Excel Programming 2 9th Mar 2007 06:33 PM
How do I copy a new module to 200 workbooks with a macro? Patrick Young Microsoft Excel Worksheet Functions 1 3rd Sep 2005 04:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:27 AM.