change order of combo box values when pasted to a worksheet

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
132
Office Version
  1. 365
Platform
  1. Windows
Hopefully this will be the last time I need assistance for this project. That being said, it does work and for intents and purposes I do not HAVE to do this, but it would be helpful if I could.

I have a userform <UFProductionSheet> that has 50+ comboboxes on various pages. Not all will be selected, but several can be in any combination. I use the code below to compile a list of all the values that are selected into one column on a sheet within the workbook <Info Sheet>, which is hidden.

Dim Ctrl As Object
For Each Ctrl In UFProductionSheet.Controls
If TypeName(Ctrl) = "ComboBox" Then
If Ctrl.Value <> "" Then
Sheets("Info Sheet").Range("AHJ" & Rows.Count).End(xlUp).Offset(1).Value = Ctrl.Value
End If
End If
Next

My question is:
Is there a way to ensure the list is compiled in a specific order? Meaning can I assign numbers, similar to the way the TabIndex property works, to the combobox properties so that they are listed according to order or can I accomplish this by some other means? Or do I simply need to live with it?

Thanks in advance -

Robert :)
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
How do you want to sort it?
You can sort by the content of the combos, by the name of the combos, also by the tabindex, you can choose which page first, which one later, etc.
If you have an idea of ​​how you want the sort, we look for the way and help you.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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