I have 7 if statements nested inside each other, each one represents a condition. Is there an easy way I can tidy this up and still know which condition caused the error?
My code is a nightmare to read!
;)
Printable View
I have 7 if statements nested inside each other, each one represents a condition. Is there an easy way I can tidy this up and still know which condition caused the error?
My code is a nightmare to read!
;)
I'm a newb programmer...but can't you use a Case ?
And to be on the safe side we might show how "a Case" works.
Here's an example with a combobox:
/LeyanCode:Select Case ComboBox1.SelectedIndex
Case 0
'code
Case 1
'code
Case 2
'code
Case Else
'code
End Select