Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change the name of a worksheet/update VBA code Dave F[_2_] Excel Discussion (Misc queries) 1 June 8th 07 09:22 PM
Sheet protection code conflicts with Pivot Table "auto refresh" KG Excel Discussion (Misc queries) 6 December 21st 05 11:16 PM
Code to run on worksheet selection change dan winterton Excel Programming 3 December 17th 04 11:45 PM
Code not working after worksheet change. Erik Excel Programming 0 September 17th 04 04:01 AM
Worksheet change code Frank Kabel Excel Programming 1 July 27th 04 04:58 PM


All times are GMT +1. The time now is 07:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"