View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Visible = True - Not Working

What event did you put that code in? Your code works for me if placed in the
CommandButton's Click event.

--
Rick (MVP - Excel)


"Minitman" wrote in message
...
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