D
DoveArrow
I'm trying to create a form where, if there is text in a text box, a
pair of command buttons will be enabled. I have figured out how to
make this work if the text box has been updated, but I can't figure
out how to make it work if there's already text in the box when the
form opens. If it helps, here's the code I've written to make the
buttons enable after text has been entered into the text box.
Private Sub Class1_Change()
If IsNull(Class1) Then
Class1LvlAdd.Enabled = False
Class1LvlRemove.Enabled = False
Else
Class1LvlAdd.Enabled = True
Class1LvlRemove.Enabled = True
End If
End Sub
Note: Right now, I'm taking my first baby steps into using Visual
Basic, so if the above looks laughably amateur, please be gentle.
pair of command buttons will be enabled. I have figured out how to
make this work if the text box has been updated, but I can't figure
out how to make it work if there's already text in the box when the
form opens. If it helps, here's the code I've written to make the
buttons enable after text has been entered into the text box.
Private Sub Class1_Change()
If IsNull(Class1) Then
Class1LvlAdd.Enabled = False
Class1LvlRemove.Enabled = False
Else
Class1LvlAdd.Enabled = True
Class1LvlRemove.Enabled = True
End If
End Sub
Note: Right now, I'm taking my first baby steps into using Visual
Basic, so if the above looks laughably amateur, please be gentle.