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:
1613274841222.png
 
Upvote 0

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 the idea is, choose a menu style - the form appears and you fill it out, then choose another on etc. so the multipage only has 3 pages
 
Upvote 0
so you might set up a breakfast prod order and plated lunch and dinner
 
Upvote 0
it is easier when planning your project to get small modules working rather than try and get 100 things all half working, so we can sort 1 menu of code first then extend
 
Upvote 0
so the idea is, choose a menu style - the form appears and you fill it out, then choose another on etc. so the multipage only has 3 pages
Assuming the menus on the right is not the list in its entirety, its intriguing, though I not even close to knowing how that works . . .
 
Upvote 0
However inefficient this is, the older version I used actually did work strangely enough. I guess I just got too ambitious. If I haven't mentioned it lately, thank you SOOOOOO much for this.
 
Upvote 0
i just got the menu sections from the names you had on the multipage. so for the moment. lets assume we want to do a PO for the breakfast buffet menu. the procedure is go to your sheet "Breakfast Buffet" and then put all of the menus listed in Col W into comboboxes on the form?
 
Upvote 0
One of the things I would like to accomplish is to be able to hide all sheets except the welcome sheet and have the code function. I also would like the MASTER INFO and PRODUCTION SHEET to be very hidden so no one can access it and ruin something
 
Upvote 0
so is my previous post correct process in your mind of what should happen
 
Upvote 0

Forum statistics

Threads
1,216,441
Messages
6,130,643
Members
449,585
Latest member
Nattarinee

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