View Single Post
  #11  
Old 01-10-2009, 08:21 PM
shg's Avatar
shg shg is online now
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,479
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
I'll take a little issue with Rob's suggestion. Using GoTo statements for anything other than error handling make code hard to follow, debug, and maintain, and VBA has a wealth of flow control structures to choose from to avoid them. For example,
Code:
    For i = 1 To 10
        If cond1 Then
            ' do this
        ElseIf cond2 Then
            ' do that
        Else
            ' do the other thing
        End If
    Next i
__________________
Entia non sunt multiplicanda sine necessitate.

Last edited by shg; 01-10-2009 at 09:32 PM.
Reply With Quote