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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
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

robertmwaring2

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

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
132
Office Version
  1. 365
Platform
  1. Windows
cant see the pic.
Can you see it in my last post or do I need to upload it to a cload and provide a link?

Do you need to see each page inthe multupage or just the first page of the form?

Added them here just in case

pic 1

pic 2
 
Upvote 0

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
ok i have the file. i will take a quick look...
 
Upvote 0

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
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

robertmwaring2

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

robertmwaring2

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

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,337
Office Version
  1. 2010
Platform
  1. Windows
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,186,743
Messages
5,959,507
Members
438,429
Latest member
Ekana99

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
Top