
07-16-2003, 04:17 PM
|
 |
Contributor
|
|
Join Date: Apr 2003
Location: Houston, TX
Posts: 456
|
|
another stupid question - if then/click statements
|
Observe the following: I have two objects - a control button with the name Command1 and a text box named txtBox.
Private Sub Command1_Click()
Dim A As Integer
Dim B As Integer
Dim C As Integer
If txtBox.Text = "" Then A = 0:txtBox.SetFocus
A = 1
B = 2
C = 3
End Sub
My problem with the above is that if there is nothing in the txtBox I don't want A=1, B=2, C=3. I want it to skip it without using the command ELSE!!!!
Because the above is just an example of something larger. I have about 30 code IF/THEN statements where A=1, B=2, C=3 are! Any ideas as to as to what is best is appreciated always!
Thanks,
Stephen
|
|