Hi All,
Not sure where I am going wrong. I have a userform and I want items within the listbox to be removed depending on the value of a textbox in the form.
I currently have
I have tried .RemoveItem"Select Process"
But each variation google gives me, I get error messages.
Help please
Thanks,
Cat
Not sure where I am going wrong. I have a userform and I want items within the listbox to be removed depending on the value of a textbox in the form.
I currently have
Code:
Private Sub UserForm_Initialize()
NameTextBox.Value = Application.UserName
With DepartmentListBox
.AddItem "Select Process"
.AddItem "Goods In"
.AddItem "Machine Shop"
.AddItem "First off Inspection"
.AddItem "In Process Check"
.AddItem "Final Inspection"
.AddItem "DMN Rework"
.AddItem "DMN Scrap"
.AddItem "Quality Out"
.AddItem "Goods Out"
.AddItem "Production Office"
.AddItem "Laser Marking"
.AddItem "Kitted"
.AddItem "Out Plant"
.ListIndex = 0
End With
'If Application.UserName = "Cat Edwards" Then
' DepartmentListBox.RemoveItem "Select Process"
'End If
I have tried .RemoveItem"Select Process"
But each variation google gives me, I get error messages.
Help please
Thanks,
Cat