Give the attached a try.
Option Explicit
Dim x As Integer, y As Integer
Private Sub CommandButton1_Click()
For y = 1 To 6
UserForm1.Controls("TextBox" & y).Visible = True
UserForm1.Controls("ComboBox" & y).Visible = True
UserForm1.Controls("Label" & y).Visible = True
Next y
x = Me.TextBox1.Value
For y = x + 1 To 6
UserForm1.Controls("TextBox" & y).Visible = False
UserForm1.Controls("ComboBox" & y).Visible = False
UserForm1.Controls("Label" & y).Visible = False
Next y
UserForm2.Hide
UserForm1.Show
End Sub
Bookmarks