Combo box - Refreshed on condition

R

Rob W

Greetings,

My userform has a combo box that upon entry event is populated via a sub procedure.

The sub procedure defines a column of data on the active spreadsheet as a range and manipulates the range to add unique values only in alphabetical order into a collection.

Which the collection is then used to Add.Items to the combo box.

The userform allows selection of an existing value from the combo box OR type a new value In (no formatting on value).

When combo box is exited and a further command button is pressed the value from the combo box is added to the spreadsheet.

However, I don't need to refresh the source values of the combo box upon EVERY entry as I currently do, ONLY when a NEW value has been typed in and added to the spreadsheet.

How can I (possible check index value ??) ensure when the user types in a new value, exits field and presses the command button is the ONLY time when the combo box source values need to be refreshed.

Hope this makes some kind of sense.

Cheers

Rob
 
R

Rob W

Resolved using Index = -1
Greetings,

My userform has a combo box that upon entry event is populated via a sub procedure.

The sub procedure defines a column of data on the active spreadsheet as a range and manipulates the range to add unique values only in alphabetical order into a collection.

Which the collection is then used to Add.Items to the combo box.

The userform allows selection of an existing value from the combo box OR type a new value In (no formatting on value).

When combo box is exited and a further command button is pressed the value from the combo box is added to the spreadsheet.

However, I don't need to refresh the source values of the combo box upon EVERY entry as I currently do, ONLY when a NEW value has been typed in and added to the spreadsheet.

How can I (possible check index value ??) ensure when the user types in a new value, exits field and presses the command button is the ONLY time when the combo box source values need to be refreshed.

Hope this makes some kind of sense.

Cheers

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top