COMBOBOX VALUES

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
132
Office Version
  1. 365
Platform
  1. Windows
I have a userform that contains a mutlipage with 15 pages. All total, there are 475 comboboxes between the pages on this one form (yes i realize this is alot).
I am attempting to compile a list of all the combox values that are not left blank into a single column on a sheet within the workbook the form is apart of (Sheet3.Range("BC2:BC??"). I have used the following code previoulsy, but for whatever reason it now just loops endlessly IF any comboboxes on page 1 of the multipage are left blank.

VBA Code:
Dim Ctrl As Object
   For Each Ctrl In UFProductionSheet.Controls
      If TypeName(Ctrl) = "ComboBox" Then
         If Ctrl.Value <> "" Then
            Sheet3.Range("BC" & Rows.Count).End(xlUp).Offset(1).Value = Ctrl.Value
         End If
      End If
   Next

I really don't relish the idea of having to allocate a specific cell in the worksheet for each combobox to hold the value of the box on a change event, as I mentioned - there are 475 of them. The code above has worked flawlessly in the past, but I am in the process of creating a revised workbook that would allow for users to update more information and be less restrictive. Somewhere along the line, one of the changes I've made has caused this to stop functioning as it once did. I use the above code as a module that is called on a button click. Can anyone help me?
 
Last edited by a moderator:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
so i think the first thing i would like to look at is how you have laid out your big userform with all the tabs and comboboxes
 
Upvote 0
I truly was! (lol)
below are the screen shots you requested. I have also added links which is (are) the form itself I exported from the workbook (if that helps)

UFProductionSheet (frm)
UFProductionSheet (frx)

And at the risk of feeling completely inadequate, below is the workbook itself.

Production Sheet

It is a ridiculously large file (for excel - 20mb). Mainly due to all the formulas I have inside it to compile data into single columns from many pages that eliminate blanks. I did this because I do not know how to via vba. I hae watched many a youtube video on the matter, but cannot grasp how to make it work for my scenario, so I resort to what I know.
 

Attachments

  • ufproductionsheet(2).JPG
    ufproductionsheet(2).JPG
    73.1 KB · Views: 7
  • ufproductionsheet.JPG
    ufproductionsheet.JPG
    255.3 KB · Views: 7
Upvote 0
ok i have the file. i will take a quick look...
 
Upvote 0
so in multipage1 you have an array of menu options as pages... there seems to be 3 basic layouts. is it you thinking that each menu needs its own page? will you have to fill out multiple menus at once
 
Upvote 0
so in multipage1 you have an array of menu options as pages... there seems to be 3 basic layouts. is it you thinking that each menu needs its own page? will you have to fill out multiple menus at once
Not necessarily that they NEED to be individual pages, but I'm not the only user, so I did that too make it easier and more evident to others. And yes, there can be selections made from multiple pages, though usually not more than 3 pages.
 
Last edited:
Upvote 0
Not necessarily that they NEED to be individual pages, but I'm not the only user, so I did that too make it easier and more evident to others. And yes, there can be selections made from multiple pages, though usually not more than 3 pages.
There will never be more than 25 selections across all pages total though.
 
Upvote 0
so for now let us have just 1 menu, but it will be simple to extend a bit later... i am just drawing an idea for you to consider
 
Upvote 0

Forum statistics

Threads
1,214,377
Messages
6,119,183
Members
448,872
Latest member
lcaw

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