True, you could have this:Originally posted by CornedBee
First, I think VB has an Elsif or Elseif keyword that you can use to get rid of the useless indentation and a lot of End Ifs.
I think that the Select Case version is much more readable though.VB Code:
If lstSeeds.ListCount < 16 Then MsgBox "Not Enough Seeds", vbOKOnly, "Not Enough Seeds" ElseIf lstSeeds.ListCount > 16 Then MsgBox "Too Many Seeds", vbOKOnly, "Too Many Seeds" Else If lstLadder.ListCount > 8 Then MsgBox "Too Many Ladder Rankings", vbOKOnly, "Too Many Ladder Rankings" ElseIf lstLadder.ListCount < 8 Then MsgBox "Not Enough Ladder Rankings", vbOKOnly, "Not Enough Ladder Rankings" Else ....




Reply With Quote