Raymondc190466
New Member
- Joined
- Aug 19, 2016
- Messages
- 24
- Office Version
- 365
- Platform
- Windows
Hi Everybody,
I have issues with the population of the textbox7, and get a runtime error once data is written to a specific worksheet.
Any ideas how to solve this?
I have issues with the population of the textbox7, and get a runtime error once data is written to a specific worksheet.
Any ideas how to solve this?
VBA Code:
Private Sub UserForm_Initialize()
With Worksheets("Supplier")
ComboBox1.List = .Range("A2:A" & .Range("A" & .Rows.Count).End(xlUp).Row).Value
With Worksheets("Combobox")
ComboBox2.List = .Range("C1:C" & .Range("C" & .Rows.Count).End(xlUp).Row).Value
With Worksheets("Combobox")
ComboBox3.List = .Range("A1:A" & .Range("A" & .Rows.Count).End(xlUp).Row).Value
With Worksheets("Combobox")
ComboBox4.List = .Range("E1:E" & .Range("E" & .Rows.Count).End(xlUp).Row).Value
End With
End With
End With
End With
Me.TextBox2.Value = "Benelux"
UserForm1.BackColor = RGB(0, 0, 255)
UserForm3.BackColor = RGB(0, 0, 255)
UserForm4.BackColor = RGB(0, 0, 255)
End Sub
Private Sub ComboBox1_Change()
Me.TextBox7.Text = Application.VLookup(ComboBox1.Value, Worksheets("Supplier").Range("A2:B69"), 2, False)
End Sub