I notice that a lot of people use this format for macros.
1) I was taught that it is good form to have only 1 exit from a sub, and it should be at the end of the sub, not somewhere in the middle. This code has 2 "Exit Sub"s from the middle, and it cannot exit at the end.![]()
Please Login or Register to view this content.
2) I was also taught that the flow should always be in 1 direction (except for loops), it shouldn't have any "GoTo"s that go backwards. This code has the "GoTo CleanUp" that goes backwards.
My macros use this format, that avoids both issues.
Did the rules change after I learned? Does anyone have any comments about why mine is not good? Are there any web sites where this issue is discussed (especially sites that argue for the 1st method)?![]()
Please Login or Register to view this content.
Bookmarks