Code Conflicts With Worksheet Change Code
I have a spreadsheet such that when the user clicks on a button (attached to
a macro), it manipulates the data and inserts columns at specific points. However, there is a conflict in the process because at one point it says to select Column K (to insert another column), and I get an error because in the module for that sheet under Worksheet_Change is a macro that runs whenever any cell in Column K is selected. Is there a way to get around this, other than rearranging the format of the spreadsheet itself? |
Code Conflicts With Worksheet Change Code
Alright - DUH!!!! Right after I sent this I realized I could use
Application.EnableEvents. Sorry about that! "Paige" wrote: I have a spreadsheet such that when the user clicks on a button (attached to a macro), it manipulates the data and inserts columns at specific points. However, there is a conflict in the process because at one point it says to select Column K (to insert another column), and I get an error because in the module for that sheet under Worksheet_Change is a macro that runs whenever any cell in Column K is selected. Is there a way to get around this, other than rearranging the format of the spreadsheet itself? |
Code Conflicts With Worksheet Change Code
Disable events before doing it
Application.EnableEvents = False and reset afterwards. -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Paige" wrote in message ... I have a spreadsheet such that when the user clicks on a button (attached to a macro), it manipulates the data and inserts columns at specific points. However, there is a conflict in the process because at one point it says to select Column K (to insert another column), and I get an error because in the module for that sheet under Worksheet_Change is a macro that runs whenever any cell in Column K is selected. Is there a way to get around this, other than rearranging the format of the spreadsheet itself? |
Code Conflicts With Worksheet Change Code
Thanks, Bob. I think we had ESP at the same time!!
"Bob Phillips" wrote: Disable events before doing it Application.EnableEvents = False and reset afterwards. -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Paige" wrote in message ... I have a spreadsheet such that when the user clicks on a button (attached to a macro), it manipulates the data and inserts columns at specific points. However, there is a conflict in the process because at one point it says to select Column K (to insert another column), and I get an error because in the module for that sheet under Worksheet_Change is a macro that runs whenever any cell in Column K is selected. Is there a way to get around this, other than rearranging the format of the spreadsheet itself? |
All times are GMT +1. The time now is 12:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com