Waterpolo1
New Member
- Joined
- Sep 8, 2015
- Messages
- 21
I have the following worksheets:
6-8mm
8-10mm
15-20mm
25-35mm
40-50mm
I have a list box in my userform containing these numbers. I need to activate the sheet once it is selected. I have this. but it doesn't work.
Private Sub Submitbutton_Click()
If ListBox1.Value = "6 - 8mm" Then
Worksheets("Trigger Points 6 - 8mm Plate").Activate
ElseIf ListBox1.Value = "10 - 12mm" Then
Worksheets("Trigger Points 10 - 12mm Plate").Activate
ElseIf ListBox1.Value = "15 - 20mm" Then
Worksheets("Trigger Points 15 - 20mm Plate").Activate
ElseIf ListBox1.Value = "25 - 35mm" Then
Worksheets("Trigger Points 25 - 35mm Plate").Activate
ElseIf ListBox1.Value = "40 - 50mm" Then
Worksheets("Trigger Points 40 - 50mm Plate").Activate
End If
End Sub
Any help would be great,
Thanks
6-8mm
8-10mm
15-20mm
25-35mm
40-50mm
I have a list box in my userform containing these numbers. I need to activate the sheet once it is selected. I have this. but it doesn't work.
Private Sub Submitbutton_Click()
If ListBox1.Value = "6 - 8mm" Then
Worksheets("Trigger Points 6 - 8mm Plate").Activate
ElseIf ListBox1.Value = "10 - 12mm" Then
Worksheets("Trigger Points 10 - 12mm Plate").Activate
ElseIf ListBox1.Value = "15 - 20mm" Then
Worksheets("Trigger Points 15 - 20mm Plate").Activate
ElseIf ListBox1.Value = "25 - 35mm" Then
Worksheets("Trigger Points 25 - 35mm Plate").Activate
ElseIf ListBox1.Value = "40 - 50mm" Then
Worksheets("Trigger Points 40 - 50mm Plate").Activate
End If
End Sub
Any help would be great,
Thanks