Right, the title says it all - for part of my code, I need to remove the select item on the combobox.
I've tried a variety of things, such as:
'Suggested by the microsoft website
ComboBox1.Items.Remove (ComboBox1.SelectedItem)
'I know the ComboBox1.RemoveItem works as I've used it before. Just doesn't work when the argument is ComboBox1.Value
ComboBox1.RemoveItem (ComboBox1.Value)
Dim myVar$
myVar = ComboBox1.Value
ComboBox1.RemoveItem (myVar)
Nothing works. I always get the following error:
Capture.PNG
I know this error pops up when the required item isn't found.
For reference, the items in the combo box always have the format index number - name - price
so for example 3 - Hotel in London - £4,392.30
Any suggestions? It should be simple really. All it does is transfer the combobox item to another combobox, then delete the initial combobox item.
Also, on another note, is there code to create objects on a userform - e.g. create a new caption?
Thanks!
Lady Marmalade
Bookmarks