asma410
New Member
- Joined
- Feb 1, 2005
- Messages
- 35
hi!
i have created a combo box in excel using control toolbox. also, i added a list to the box using VB code. i need a code which will enable me to edit the contents of the list. the code to create the list runs as follows:
Private Sub Worksheet_Activate()
ComboBox1.Clear
ComboBox1.AddItem "electrical"
ComboBox1.AddItem "mechanical"
ComboBox1.AddItem "chemical"
End Sub
this will give me a list to choose from for the dropdown combo box: electrical, mechanical, chemical . now, i need to compile a code which will allow the user to add or delete items from the list (ex: add "civil" or delete "chemical).
please send in suggestions. i will really appreciate it.
note: the task of add/delete items is to be done by directly typing in the combo box & not by going inside the code & making changes.
i have created a combo box in excel using control toolbox. also, i added a list to the box using VB code. i need a code which will enable me to edit the contents of the list. the code to create the list runs as follows:
Private Sub Worksheet_Activate()
ComboBox1.Clear
ComboBox1.AddItem "electrical"
ComboBox1.AddItem "mechanical"
ComboBox1.AddItem "chemical"
End Sub
this will give me a list to choose from for the dropdown combo box: electrical, mechanical, chemical . now, i need to compile a code which will allow the user to add or delete items from the list (ex: add "civil" or delete "chemical).
please send in suggestions. i will really appreciate it.
note: the task of add/delete items is to be done by directly typing in the combo box & not by going inside the code & making changes.