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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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