Leading zero lost in Combobox

rdwhitney

New Member
Joined
Sep 27, 2019
Messages
7
I can't seem to find a way to save leading zeros in my Combobox list. The zeros are necessary since they correspond to unique IDs and are formated as text in the worksheet. These unique numbers may appear more than once so I'm using this portion of the form to narrow down my selection. The source for the list is a dynamic named range. Unfortinitly if the leading zero(s) are missing from my selection in the combo box the filterd results for the next section is worthless. It works like a charm for any IDs without a leading zero.

Here's what I have. I'd appreciate any help I can get.


Private Sub UserForm_Initialize()

Dim e As Variant
Dim ws As Worksheet
Set ws = Worksheets("RepairData")
For Each e In SortArray(UniqueValues(ws.Range("SurveyTag_List")))
CB_SurveyTag.AddItem e
Next e
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Thank you for all your help and patience Akuini. I utilized your first example and it worked perfectly.
I know the whole project needs to be cleaned up and I plan to use your second example when I sart down that road.
Thank you again.
 
Upvote 0
You're welcome, glad to help, & thanks for the feedback.:)
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,107
Members
452,302
Latest member
TaMere

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