T
Todd
I have Sheet1 in Workbook1. Workbook1 also has Module1 which contains
Procedure1. Sheet1 has an on change event that calls Procedure1. I want to
publish Sheet1 to a new file (Workbook2) so I use the Sheets("Sheet1").Copy
command to do this. The problem is, I also want to delete some columns and
rows from Sheet1 in Workbook2 and, when I do this, it triggers the on change
event (because this code was also copied with Sheet1 when I copied it into
Workbook2) which tries to call Procedure1 which doesn't exist in Workbook2 so
I crash.
Question - how can I copy a sheet to a new workbook but not copy the code
for that sheet that existed in the orginal workbook? In other words, I do
not want Sheet1 in Workbook2 to have an on change event. I know I have run
into this before and it seems like there was a simple solution but it escapes
me now. Thanks in advance to anyone that can offer a solution.
Procedure1. Sheet1 has an on change event that calls Procedure1. I want to
publish Sheet1 to a new file (Workbook2) so I use the Sheets("Sheet1").Copy
command to do this. The problem is, I also want to delete some columns and
rows from Sheet1 in Workbook2 and, when I do this, it triggers the on change
event (because this code was also copied with Sheet1 when I copied it into
Workbook2) which tries to call Procedure1 which doesn't exist in Workbook2 so
I crash.
Question - how can I copy a sheet to a new workbook but not copy the code
for that sheet that existed in the orginal workbook? In other words, I do
not want Sheet1 in Workbook2 to have an on change event. I know I have run
into this before and it seems like there was a simple solution but it escapes
me now. Thanks in advance to anyone that can offer a solution.