Excel Code for populating hidden tab when option is selected in list box

DesFitz

New Member
Joined
May 5, 2017
Messages
3
Hello All,

First time post here. I have created a document which has a list box on the summary page in which items can be chosen. There are three tabs I have created for these options.

Examples of list drop down information: Fred, George, Liz, Fred & George, Fred & Liz, George & Liz, Fred & George & Liz.

Again, I have one hidden tab for each option. But I would like for the tabs appear once these options are selected. I did open the view code on the summary page and tried the following formula for the first option:



Private Sub CheckBox21_Click()
If CheckBox21.value = True Then Range("B234").value = True
If CheckBox21.value = False Then Range("B234").value = 0
Sheets("George").Visible = CheckBox21.value

Application.ScreenUpdating = True

End Sub

This did not work, although I have seen this formula used on another work document and it does work. Any help would be greatly appreciated.

Thanks,

DesFitz
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How did that code not work?
 
Upvote 0
There's nothing in the posted code that would populate a cell, the only reference to a sheet is here,
Code:
Sheets("George").Visible = CheckBox21.value
and that is setting the visibility of the sheet 'George' based on the checkbox value.
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

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