MarkAtlanta
Board Regular
- Joined
- Sep 26, 2003
- Messages
- 66
I've seen VBA code that deletes a module, and code that deletes VBA lines, but nothing that comments out a line of VBA code. How do I do it?
I would want something like:
Macro2 is in a module that I am going to delete via VBA, but when I run Macro1 again, it wouldn't compile because Macro2 isn't defined anywhere, so it would be great to commentout that line, that way it would compile because now I have
Thanks
I would want something like:
Code:
Sub commentout()
Macro1.line1.commentout
end sub
Code:
sub Macro1
Call Macro2
Range("A1").value = 123
end sub
Code:
sub Macro1
' Call Macro2
Range("A1").value = 123
end sub
Thanks