COMBOBOX VALUES

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
104
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:

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
104
Office Version
  1. 365
Platform
  1. Windows
the more i think about it though, i dont think i should be altering the breakfast meat in that cell. If it is being copied somewhere, i feel like it would be smarter to replace it there so it can be erased in order to restart the form as if it were freshly opened if more than one production sheet needed to be created. Or are you so genius that doesnt even matter? lol
 

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,284
Office Version
  1. 2010
Platform
  1. Windows
ok then. i get that. so i am thinking there is a better way to store this block of data so that when the pogram starts, it reads it in once and then uses it from memory rather than cell referencing
 

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,284
Office Version
  1. 2010
Platform
  1. Windows
where is there a list of every option, and a list of every meal type
 

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
104
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

ok then. i get that. so i am thinking there is a better way to store this block of data so that when the pogram starts, it reads it in once and then uses it from memory rather than cell referencing
Not sure what you meant by store the block of data, but the way it is set up is what the chefs are used to, anything drastic would be painful to adjust them to, lol
the goal was make all your "lists" of possible questions or additional selections on the -Info- Sheet. then on each menu page, you could have a maximum of 6 questions/possible selections per menu sheet. the header is the same as the header on the info sheet, but the list on the menu sheets are the menu items that require the additional choice. If that wasnt too confusing. it makes it easy and by using drop downs it insure they dont spell something wrong.
 

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
104
Office Version
  1. 365
Platform
  1. Windows
where is there a list of every option, and a list of every meal type
well, column w on each menu sheet is the sum total of all the menu items on that sheet - same column hold the same info on each other menu sheet as well. as far as a list of all column w's from each menu sheet, it gets a bit more complicated from there, but i started in column Q on the -Maser Info- Sheet

as far as the every option - there isnt a single list but the range is -Info-C2:W36
 

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,284
Office Version
  1. 2010
Platform
  1. Windows

ADVERTISEMENT

i have found that list -Info-C2:W36.
so which page do the chefs use to design / update the menus. is that a sheet such as 'lunch buffet' do they mess with the other sheets (ie the ones that do all the control functions etc)
 

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
104
Office Version
  1. 365
Platform
  1. Windows
i have found that list -Info-C2:W36.
so which page do the chefs use to design / update the menus. is that a sheet such as 'lunch buffet' do they mess with the other sheets (ie the ones that do all the control functions etc)
no they do not. with the exception of the -Info- Sheet. the master info and production sheet have previously been "very hidden" the info sheet is key to the menu sheets because of the options that may be available for any given menu item. there may be 11 columns of info on the info sheet, but there will never be a single menu item that will require 11 choices. aside from that, on each menu sheet, i have just limited the number of allowed different choices (columns) to 6.
 

robertmwaring2

Board Regular
Joined
Mar 8, 2019
Messages
104
Office Version
  1. 365
Platform
  1. Windows
no they do not. with the exception of the -Info- Sheet. the master info and production sheet have previously been "very hidden" the info sheet is key to the menu sheets because of the options that may be available for any given menu item. there may be 11 columns of info on the info sheet, but there will never be a single menu item that will require 11 choices. aside from that, on each menu sheet, i have just limited the number of allowed different choices (columns) to 6.
chefs can access all sheets except master info and production sheet. In case my response was unclear as usual (lol - sorry)
 

diddi

Well-known Member
Joined
May 20, 2004
Messages
3,284
Office Version
  1. 2010
Platform
  1. Windows
does this summarise the data correctly? i have not included the next level down that has what is in the menu choice, but i want to get the top levels right first
1614575752330.png
 

Watch MrExcel Video

Forum statistics

Threads
1,128,154
Messages
5,629,011
Members
416,358
Latest member
grsaltzman

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