User edits of combobox entries in Excel 2007 VBA user forms

phudgens

New Member
Joined
Mar 23, 2011
Messages
2
I am using Excel 2007 VBA code to load data into a combobox located on page 2 of a multi-page form which in turn is located on a user form. Depending on what the user enters in textboxes on page 1 of the multi-page form, the combobox is loaded with a calculated number of lines. The user then needs to edit various of those entries in the combobox, without adding new entries or deleting any entries. Even though I can select entries in the combobox which then appear in the display, and enter new values in the window, those new values do not become permanent. Is there a way to allow users to change/edit entries in a combobox in Excel VBA user forms?

Thanks for any help,
Paul Hudgens
Denver
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi Paul and Welcome,

How are you populating the ComboBox list you currently have?

Based on your desire to allow the user to make changes to the list which are saved for the next session, I'd suggest you store your intial list in a named range in your workbook. Then as the user adds new values, you add those values to the named range in your workbook. As long as your workbook is saved with the changes, the list will retain the additions.

You can search this site for examples of Dynamic Ranges, which allow your named range to automatically be resized when you add items to the list.
 
Upvote 0
Thanks for your reply. I do intend to give the user the option of saving all entered/edited data. What I need to do though is harvest the entered/edited data and create an external text file which is then fed into a software program. I've got working code to do all this, except for the editing combobox entries part. I had though that there would be a way for the user to edit entries in the combobox, once it has been populated. I had assumed that that was what the display window was for on a combobox - but it doesn't appear to work that way. I can probably make it work via a InputBox triggered by the _Click event - I had just hoped that there would be an in-line, on-the-fly, way of doing it. Thanks for the help.
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,424
Members
452,914
Latest member
echoix

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top