I have a User Form with several Multipages. On Multipage 1 the user must select Yes or No from two sets of option buttons and if applicable, check or leave blank two separate checkboxes. How the user fills these fields drives whether or not another set of check boxes resident on a subsequent Multipage (Multipage 5).
Clicking the “Next” button (Private Sub CommandButton39_Click) at the bottom of Multipage1 is what causes the code to execute. I’m struggling mightily with the case statements and declarations. If anybody can review and comment on the code I have thus far, which now only include three possible scenarios, that would be great.
Thanks
![]()
Private Sub CommandButton39_Click() Dim Logistics As Variant Dim V As Variant Dim x As Variant Dim y As Variant Dim Z As Variant V = CheckBox378.Value x = OptionButton1.Value y = OptionButton2.Value Z = CheckBox345.Value Me.MultiPage1.Value = 11 Select Case Logistics Case Is = y = True And Z = True Label1582.Visible = True Label1583.Visible = True CheckBox363.Visible = True CheckBox364.Visible = True CheckBox365.Visible = True CheckBox366.Visible = True CheckBox367.Visible = True CheckBox368.Visible = True CheckBox369.Visible = True CheckBox370.Visible = True CheckBox371.Visible = True CheckBox372.Visible = True CheckBox373.Visible = True CheckBox374.Visible = True Case Is = y = True And Z = "" And V = "" Label1582.Visible = False Label1583.Visible = False CheckBox363.Visible = False CheckBox364.Visible = False CheckBox365.Visible = False CheckBox366.Visible = False CheckBox367.Visible = False CheckBox368.Visible = False CheckBox369.Visible = False CheckBox370.Visible = False CheckBox371.Visible = False CheckBox372.Visible = False CheckBox373.Visible = False CheckBox374.Visible = False Case Is = y = True And Z = False And V = True Label1582.Visible = False Label1583.Visible = False CheckBox363.Visible = False CheckBox364.Visible = False CheckBox365.Visible = False CheckBox366.Visible = False CheckBox367.Visible = False CheckBox368.Visible = False CheckBox369.Visible = False CheckBox370.Visible = False CheckBox371.Visible = False CheckBox372.Visible = False CheckBox373.Visible = False CheckBox374.Visible = False End Select End Sub
Bookmarks