Worksheet_Change - loop within a loop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there

I am using WorkSheet_change to ascertain whether data has changed on the spreadsheet, and from there I check to see which cell it changed in. If it changed in a certain cell then I change all the values in that column using a For..Next loop. The only problem here is that it seems to trigger the Worksheet_Change macro everytime it changes one cell and starts at the beginning. Is there a way to surpress the Worksheet_Change trigger while performing a function

thanks in advance.
 
Yes, precede the code with

Application.EnableEvents = False

make sure that you set it back to true before exiting the event macro.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

bgm said:
Hi there,

I am using WorkSheet_change to ascertain whether data has changed on the
spreadsheet, and from there I check to see which cell it changed in. If it
changed in a certain cell then I change all the values in that column using
a For..Next loop. The only problem here is that it seems to trigger the
Worksheet_Change macro everytime it changes one cell and starts at the
beginning. Is there a way to surpress the Worksheet_Change trigger while
performing a function?
 
Back
Top