• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to export cell change event code from one worksheet to another copied worksheet

ThrottleWorks

Excel Ninja
Hi,
I have a macro workbook.
There are normal modules written in this book and some are written for cell change event.
Cell change event codes are written in the particular worksheet and these are running fine.
Issue is, I need to create multiple copies of this worksheet as per the user requirement.
While running the macro, user will provide a number of copies required, based on that, macor creates copy of this master worksheet.
My problem is, am not able to copy the cell change event code linked to the master worksheet to copies created.
How do I export cell change event code of the master worksheet to copies as well.
Can anyone please help me in this.
 
Hi @Debaser thanks a lot for the help. Below code is working good for me.
Do not know why, my previous code was not copying related modules hence I got confused.
Have a nice day ahead. :)

Code:
Public Sub CopySelectedSheets()
ActiveSheet.Copy After:=Sheets(Sheets.Count)
ActiveSheet.name = "Foo"
End Sub
 
Back
Top