M
Minitman
Greetings,
I have a CommandButton on a UserForm That is covering a label and a
TextBox. If there is a number in the TextBox, I need for the
CommandButton to be NOT visible, so that I can see the number. If
there is no number in the TextBox I need for the CommandButton to be
visible and cover the Label & TextBox. Clicking the button will put
the next available number into the TextBox and at the same time make
the CommandButton not visible.
This is the code that I trying to use:
______________________________________________
Select Case TextBox1
Case vbNullString
MsgBox "TextBox1 is Empty" & TextBox1
btnNextInvNumber.Visible = True
Case Else
MsgBox "TextBox1 Has A Number" & TextBox1
btnNextInvNumber.Visible = False
End Select
______________________________________________
The MsgBoxes were to see if the code was actually going were it was
supposed to - it is. It is just not triggering the visible property
Is there something wrong with my code?
Is there some setting that would cause this not work?
And if there is, where do I look for it?
Any help would be appreciated.
-Minitman
I have a CommandButton on a UserForm That is covering a label and a
TextBox. If there is a number in the TextBox, I need for the
CommandButton to be NOT visible, so that I can see the number. If
there is no number in the TextBox I need for the CommandButton to be
visible and cover the Label & TextBox. Clicking the button will put
the next available number into the TextBox and at the same time make
the CommandButton not visible.
This is the code that I trying to use:
______________________________________________
Select Case TextBox1
Case vbNullString
MsgBox "TextBox1 is Empty" & TextBox1
btnNextInvNumber.Visible = True
Case Else
MsgBox "TextBox1 Has A Number" & TextBox1
btnNextInvNumber.Visible = False
End Select
______________________________________________
The MsgBoxes were to see if the code was actually going were it was
supposed to - it is. It is just not triggering the visible property
Is there something wrong with my code?
Is there some setting that would cause this not work?
And if there is, where do I look for it?
Any help would be appreciated.
-Minitman