robertmwaring2
Board Regular
- Joined
- Mar 8, 2019
- Messages
- 132
- Office Version
- 365
- Platform
- 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
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