Mikeymike_W
Board Regular
- Joined
- Feb 25, 2016
- Messages
- 171
Hi, I am trying to make a label visible/invisible depending on the partial value of a textbox in a userform.
So the text box will contain lots of different text but if it contains Top of the card or bottom of the card etc then i want te label to be visible otherwise i want the label to be invisible.
This is what I have been trying but the label is always visible:
Many thanks in advance for your help,
Mike
So the text box will contain lots of different text but if it contains Top of the card or bottom of the card etc then i want te label to be visible otherwise i want the label to be invisible.
This is what I have been trying but the label is always visible:
VBA Code:
If TBRandA.Text <> "The top of the Card" Then
LblInfo1.Visible = True
ElseIf TBRandA.Text <> "The bottom of the Card" Then
LblInfo1.Visible = True
ElseIf TBRandA.Text <> "The left of the Card" Then
LblInfo1.Visible = True
ElseIf TBRandA.Text <> "The right of the Card" Then
LblInfo1.Visible = True
Else
LblInfo1.Visible = False
End If
Many thanks in advance for your help,
Mike