Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skipping sections of code
I have a long run of code (not modular). Is it possible
to set breaks on a particular section of code (begin and end break) so that it will not run when the macro is running? Or is the only way to do this on non modular code to comment out the sections of code? THanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Skipping sections of code
It is really poor practice to use, but VBA still includes the good ol' Goto
statement. The following will only print "Starting...": Public Sub GotoTest() Debug.print "Starting..." Goto SkipEnd Debug.print "Ending." SkipEnd: End Sub This would be OK while you test your code, and it does work, but it is not good practice to use it normally. "ExcelMonkey" wrote: I have a long run of code (not modular). Is it possible to set breaks on a particular section of code (begin and end break) so that it will not run when the macro is running? Or is the only way to do this on non modular code to comment out the sections of code? THanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
reference row on another sheet skipping zeros but not skipping li. | Excel Discussion (Misc queries) | |||
Worksheet Sections | Excel Discussion (Misc queries) | |||
Worksheet Sections | Excel Discussion (Misc queries) | |||
if formula with two sections | Excel Discussion (Misc queries) | |||
Background Color Code Sections | Charts and Charting in Excel |