Hi Everyone
I am preparing a user form which incorporates date, time and then selections from drop down lists. The first list is 1 to 3, at this point I would like the second list to be generated from the first, the code:
[pre]
[/pre]
The problem I have is that I cannot work out is how to generate Number2 list based on Number list. Just thinking as I type, I probably need to have a second user form as it would not be possible to generate list Number2 "on the fly" using this method.
The other issue I am having is that I don't know how to get the data from the form into the spread sheet, are there any good tutorials? I haven't been able to find any.
Cheers
Shaun
I am preparing a user form which incorporates date, time and then selections from drop down lists. The first list is 1 to 3, at this point I would like the second list to be generated from the first, the code:
[pre]
Code:
Private Sub UserForm_Activate()
FormDate = Format(Now(), "DD MMMM YYYY")
FormTime = Format(Now(), "H:MM:SS am/pm")
With Number
.AddItem "1"
.AddItem "2"
.AddItem "3"
End With
With Number2
If Number.Value = "1" Then
.AddItem "4"
Else
If Number = "2" Then
.AddItem "5"
.AddItem "6"
.AddItem "7"
.AddItem "8"
.AddItem "9"
.AddItem "10"
Else
If Number = "3" Then
.AddItem "11"
.AddItem "12"
.AddItem "13"
.AddItem "14"
.AddItem "15"
Else
End If
End If
End If
End With
End Sub
The problem I have is that I cannot work out is how to generate Number2 list based on Number list. Just thinking as I type, I probably need to have a second user form as it would not be possible to generate list Number2 "on the fly" using this method.
The other issue I am having is that I don't know how to get the data from the form into the spread sheet, are there any good tutorials? I haven't been able to find any.
Cheers
Shaun