Hi I keep getting an error after placing this vba into a userform to basically stop popel inputting info into a userform unless they specify the number they require. Anybody got any solutions or is there a better way. Also when I debug it points to the vba which calls the userform. Thanks in advance.
Private Sub MultiPage1_enter()
MultiPage1.Pages(0).Enabled = False
MultiPage1.Pages(1).Enabled = False
MultiPage1.Pages(2).Enabled = False
MultiPage1.Pages(3).Enabled = False
MultiPage1.Pages(4).Enabled = False
If ComboBox1 = "1" Then
MultiPage1.Pages(0).Enabled = True
MultiPage1.Value = 0
ElseIf ComboBox1 = "2" Then
MultiPage1.Pages(0).Enabled = True
MultiPage1.Pages(1).Enabled = True
MultiPage1.Value = 0
ElseIf ComboBox1 = "3" Then
MultiPage1.Pages(0).Enabled = True
MultiPage1.Pages(1).Enabled = True
MultiPage1.Pages(2).Enabled = True
MultiPage1.Value = 0
ElseIf ComboBox1 = "4" Then
MultiPage1.Pages(0).Enabled = True
MultiPage1.Pages(1).Enabled = True
MultiPage1.Pages(2).Enabled = True
MultiPage1.Pages(3).Enabled = True
MultiPage1.Value = 0
ElseIf ComboBox1 = "5" Then
MultiPage1.Pages(0).Enabled = True
MultiPage1.Pages(1).Enabled = True
MultiPage1.Pages(2).Enabled = True
MultiPage1.Pages(3).Enabled = True
MultiPage1.Pages(4).Enabled = True
MultiPage1.Value = 0
End If
End Sub
Bookmarks