Disabling worksheet_change when running a specific macro . .

  • Thread starter Thread starter Adam
  • Start date Start date
A

Adam

Hi,
I have a macro that does a series of copy & pastes inside the module
code. How do I prevent this macro from firing a series of events in the
worksheet_change() in the worksheet code?

BTW, I have a condition for Application.cutcopymode = 0, which
correctly disables manual copy and paste.

The macro that I have running in the module code is called Sub
InsertProj

This is what I expect my worksheet_change() code to look like . . .

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("W:W")) Is Nothing Then
If Application.CutCopyMode = 0 Then
If <* Condition to disable macro "Sub InsertProj" *> = 0 Then
<< Event >>
End If
End If
End If

I need to know how to write the <* Condition to disable macro "Sub
InsertProj" *> = 0

Thanks!
Adam
 
Never mind . . . Should've spent more time googling before posting that
.. . .
Fixed it with

sub InsertProj
Application.EnableEvents = False
<< Code >>
Application.EnableEvents = True
end sub

on my macro . .
 
Back
Top