Hi,
I want to know how to auto fill my dropdown menu without putting 16 lines in my userform code
my goal is:
when the textboxes are filled my standard value = MINI
How can i do this?
below you can see my code is a little bitt messy
if you have a shorter code please advise
Private Sub UserForm_Initialize()
TextBox1.Value = sheets("Hulpblad").Range("ak2")
TextBox2.Value = sheets("Hulpblad").Range("ak3")
TextBox3.Value = sheets("Hulpblad").Range("ak4")
TextBox4.Value = sheets("Hulpblad").Range("ak5")
TextBox5.Value = sheets("Hulpblad").Range("ak6")
TextBox6.Value = sheets("Hulpblad").Range("ak7")
TextBox7.Value = sheets("Hulpblad").Range("ak8")
TextBox8.Value = sheets("Hulpblad").Range("ak9")
TextBox9.Value = sheets("Hulpblad").Range("AM2")
TextBox10.Value = sheets("Hulpblad").Range("AM3")
TextBox11.Value = sheets("Hulpblad").Range("AM4")
TextBox12.Value = sheets("Hulpblad").Range("AM5")
TextBox13.Value = sheets("Hulpblad").Range("AM6")
TextBox14.Value = sheets("Hulpblad").Range("AM7")
TextBox15.Value = sheets("Hulpblad").Range("AM8")
TextBox16.Value = sheets("Hulpblad").Range("AM9")
ComboBox1.Value = "MINI"
ComboBox9.Value = "MINI"
''Me.ComboBox1.List = Worksheets("HULPBLAD").Range("Type_kabel")
''Me.ComboBox1.RowSource = Worksheets("HULPBLAD").Range("Type_kabel").Address(external:=True)
Me.ComboBox1.RowSource = "Type_kabel"
Me.ComboBox2.RowSource = "Type_kabel"
Me.ComboBox3.RowSource = "Type_kabel"
Me.ComboBox4.RowSource = "Type_kabel"
Me.ComboBox5.RowSource = "Type_kabel"
Me.ComboBox6.RowSource = "Type_kabel"
Me.ComboBox7.RowSource = "Type_kabel"
Me.ComboBox8.RowSource = "Type_kabel"
Me.ComboBox9.RowSource = "Type_kabel"
Me.ComboBox10.RowSource = "Type_kabel"
Me.ComboBox11.RowSource = "Type_kabel"
Me.ComboBox12.RowSource = "Type_kabel"
Me.ComboBox13.RowSource = "Type_kabel"
Me.ComboBox14.RowSource = "Type_kabel"
Me.ComboBox15.RowSource = "Type_kabel"
Me.ComboBox16.RowSource = "Type_kabel"
End Sub
I want to know how to auto fill my dropdown menu without putting 16 lines in my userform code
my goal is:
when the textboxes are filled my standard value = MINI
How can i do this?
below you can see my code is a little bitt messy
if you have a shorter code please advise
Private Sub UserForm_Initialize()
TextBox1.Value = sheets("Hulpblad").Range("ak2")
TextBox2.Value = sheets("Hulpblad").Range("ak3")
TextBox3.Value = sheets("Hulpblad").Range("ak4")
TextBox4.Value = sheets("Hulpblad").Range("ak5")
TextBox5.Value = sheets("Hulpblad").Range("ak6")
TextBox6.Value = sheets("Hulpblad").Range("ak7")
TextBox7.Value = sheets("Hulpblad").Range("ak8")
TextBox8.Value = sheets("Hulpblad").Range("ak9")
TextBox9.Value = sheets("Hulpblad").Range("AM2")
TextBox10.Value = sheets("Hulpblad").Range("AM3")
TextBox11.Value = sheets("Hulpblad").Range("AM4")
TextBox12.Value = sheets("Hulpblad").Range("AM5")
TextBox13.Value = sheets("Hulpblad").Range("AM6")
TextBox14.Value = sheets("Hulpblad").Range("AM7")
TextBox15.Value = sheets("Hulpblad").Range("AM8")
TextBox16.Value = sheets("Hulpblad").Range("AM9")
ComboBox1.Value = "MINI"
ComboBox9.Value = "MINI"
''Me.ComboBox1.List = Worksheets("HULPBLAD").Range("Type_kabel")
''Me.ComboBox1.RowSource = Worksheets("HULPBLAD").Range("Type_kabel").Address(external:=True)
Me.ComboBox1.RowSource = "Type_kabel"
Me.ComboBox2.RowSource = "Type_kabel"
Me.ComboBox3.RowSource = "Type_kabel"
Me.ComboBox4.RowSource = "Type_kabel"
Me.ComboBox5.RowSource = "Type_kabel"
Me.ComboBox6.RowSource = "Type_kabel"
Me.ComboBox7.RowSource = "Type_kabel"
Me.ComboBox8.RowSource = "Type_kabel"
Me.ComboBox9.RowSource = "Type_kabel"
Me.ComboBox10.RowSource = "Type_kabel"
Me.ComboBox11.RowSource = "Type_kabel"
Me.ComboBox12.RowSource = "Type_kabel"
Me.ComboBox13.RowSource = "Type_kabel"
Me.ComboBox14.RowSource = "Type_kabel"
Me.ComboBox15.RowSource = "Type_kabel"
Me.ComboBox16.RowSource = "Type_kabel"
End Sub