lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I have "dept" as ListBox and I am trying to initialize it using With-End With but I got compiler error. Thank you so much.
I have "dept" as ListBox and I am trying to initialize it using With-End With but I got compiler error. Thank you so much.
Code:
Private Sub UserForm_Initialize()
With dept
.AddItem = "hr"
.AddItem = "it"
.AddItem = "marketing"
.AddItem = "sales"
End With
End Sub
Last edited: