Disabling worksheet_change when running a specific macro . .

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
 
A

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 . .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top