Hi, A simple bit of code below, but P1,D1 and A1 are all input textboxes on my form. Problem is my form has a range of P1 to P30. Is there a simpler way of doing a loop with the code below rather than copy / pasting it 30 times... ?
Thanks!
If P1 = "" Then
D1.Enabled = False
A1.Enabled = False
Else
D1.Enabled = True
A1.Enabled = True
End If
If P2 = "" Then
D2.Enabled = False
A2.Enabled = False
Else
D2.Enabled = True
A2.Enabled = True
End If
Etc etc....
Thanks!
If P1 = "" Then
D1.Enabled = False
A1.Enabled = False
Else
D1.Enabled = True
A1.Enabled = True
End If
If P2 = "" Then
D2.Enabled = False
A2.Enabled = False
Else
D2.Enabled = True
A2.Enabled = True
End If
Etc etc....