JB27
New Member
- Joined
- Oct 2, 2009
- Messages
- 41
Hello,
Does anyone know if it is possible to edit one macro, with another macro?
I have the following code in Sheet1
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("AB:AB")) Is Nothing Then Exit Sub
Module2.RunSnippet1
End Sub
So everytime I edit column AB on Sheet1, it will run my code. There is another bit of code that I use however to clear Sheet1 (we'll just call it "Module3.Clear") and re-import data, which in turn changes column AB and then that triggers the code I posted above, which just hoses everything. Is there some way I can essentially turn off my Private Sub code when I run Module3.Clear and then turn it back on at the end of Module3.Clear?
I guess I'm wondering if it's possible to edit a macro, with another macro, so I could just add an apostrophy in front of it and the begging of Module3.Clear and then remove it at the end. Any thoughts and suggestions are welcome.
Does anyone know if it is possible to edit one macro, with another macro?
I have the following code in Sheet1
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("AB:AB")) Is Nothing Then Exit Sub
Module2.RunSnippet1
End Sub
So everytime I edit column AB on Sheet1, it will run my code. There is another bit of code that I use however to clear Sheet1 (we'll just call it "Module3.Clear") and re-import data, which in turn changes column AB and then that triggers the code I posted above, which just hoses everything. Is there some way I can essentially turn off my Private Sub code when I run Module3.Clear and then turn it back on at the end of Module3.Clear?
I guess I'm wondering if it's possible to edit a macro, with another macro, so I could just add an apostrophy in front of it and the begging of Module3.Clear and then remove it at the end. Any thoughts and suggestions are welcome.