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
|