jameslytle
New Member
- Joined
- Jul 30, 2018
- Messages
- 21
Need help.
I am trying to create a userform that has (Currently) four dropdown lists but I am having issues once I add the third and fourth list.
In Excel I created a name for each list of items to be used i the dropdown lists (i.e. List Name - Eye for a list of eye colors and Name - Hair for hair colors).
My problem is that I have four drop down lists. Everything was working fine until I tried to add the third and fourth drop down lists. The first two lists worked just fine but the third and fourth one I get an error message (Run time Error '1004' Method 'range' of object '_Global' failed). Now if I take the range listed for list number 2 and put it in list number 3 it works fine by showing the drop down list for number 2 on number 3 as well.
Below is a copy of the programming that I have set up for the userform so far.
Please tell me what I am doing wrong.
Thanks.
Private Sub UserForm_Initialize()
With PhenoCombo
.List = Range(PhenoType).Value
.Value = "Human"
End With
With GenderCombo
.List = Range(Gender).Value
End With
With EyeCombo
.List = Range(Eye).Value
End With
With HairCombo
.List = Range(Hair).Value
End With
End Sub
Jim
I am trying to create a userform that has (Currently) four dropdown lists but I am having issues once I add the third and fourth list.
In Excel I created a name for each list of items to be used i the dropdown lists (i.e. List Name - Eye for a list of eye colors and Name - Hair for hair colors).
My problem is that I have four drop down lists. Everything was working fine until I tried to add the third and fourth drop down lists. The first two lists worked just fine but the third and fourth one I get an error message (Run time Error '1004' Method 'range' of object '_Global' failed). Now if I take the range listed for list number 2 and put it in list number 3 it works fine by showing the drop down list for number 2 on number 3 as well.
Below is a copy of the programming that I have set up for the userform so far.
Please tell me what I am doing wrong.
Thanks.
Private Sub UserForm_Initialize()
With PhenoCombo
.List = Range(PhenoType).Value
.Value = "Human"
End With
With GenderCombo
.List = Range(Gender).Value
End With
With EyeCombo
.List = Range(Eye).Value
End With
With HairCombo
.List = Range(Hair).Value
End With
End Sub
Jim