Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change the name of a worksheet/update VBA code | Excel Discussion (Misc queries) | |||
Sheet protection code conflicts with Pivot Table "auto refresh" | Excel Discussion (Misc queries) | |||
Code to run on worksheet selection change | Excel Programming | |||
Code not working after worksheet change. | Excel Programming | |||
Worksheet change code | Excel Programming |