jameslytle
New Member
- Joined
- Jul 30, 2018
- Messages
- 21
I am having a problem getting the "Select Case" part of my VBA to work. The Case "ERAText.Value" is provided from another UserForm and is a value of 1, 2 or 3. In the case of 1 and 2 I want it to run the section listed under it which is to show a text box and list the value of "Human" in it. This seems to work just fine.
However, If I wanted to the case 3 to work where it would show a Combo Box showing a list to select from with the default value of "Human" showing up first. When "3" is selected it acts as if the first Case Option "< 3" was selected and only shows the text box with "Human" in it.
What am I doing wrong?
Thanks in advance for any assistance.
**************************************
Select Case ERAText.Value
Case Is < "3"
Me.PhenoText.Visible = True
Me.PhenoCombo.Visible = False
With PhenoText
.Value = "Human"
End With
Case Is = "3"
Me.PhenoCombo.Visible = True
Me.PhenoText.Visible = False
With PhenoCombo
.List = Range("PhenoType").Value
.Value = "Human"
End With
End Select
*******************************
Jim
However, If I wanted to the case 3 to work where it would show a Combo Box showing a list to select from with the default value of "Human" showing up first. When "3" is selected it acts as if the first Case Option "< 3" was selected and only shows the text box with "Human" in it.
What am I doing wrong?
Thanks in advance for any assistance.
**************************************
Select Case ERAText.Value
Case Is < "3"
Me.PhenoText.Visible = True
Me.PhenoCombo.Visible = False
With PhenoText
.Value = "Human"
End With
Case Is = "3"
Me.PhenoCombo.Visible = True
Me.PhenoText.Visible = False
With PhenoCombo
.List = Range("PhenoType").Value
.Value = "Human"
End With
End Select
*******************************
Jim