Need to hide columns, which has Check-box

pavanreddy

New Member
Joined
Sep 12, 2023
Messages
4
Team,
Based on a selection from a drop-down on sheet1, I need to hide the columns in sheet2, But that columns have check-box for some other validation, Could you please help me in fixing this.
Example, in sheet1, If i select AS-400 from a drop-down, Column E, Column F, Column G in sheet2 has to be hidden, but that Columns has some check-box in row 10, I need to hide all the three columns along with Check-box.
Pavan Reddy
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I am assumng you already have some VBA code written to achieve the condintioal hiding. If so, just add this line to your code, with the name of your checkbox where it says checkboxname.

Sheet1.CheckBoxes("checkboxname").Visible = vbFalse
 
Upvote 0
I am assumng you already have some VBA code written to achieve the condintioal hiding. If so, just add this line to your code, with the name of your checkbox where it says checkboxname.

Sheet1.CheckBoxes("checkboxname").Visible = vbFalse
Hi Anfinsen,
Now my requirement has changed, in the sheet1, I have check-box instead of drop-down. When I select a particular check-box in sheet1, the Column-D in sheet2 has to be hidden and check-box in that particular Column-D has to hide as well, I am using the below code to hide Column-D in sheet2.

Private Sub CheckBox1_Click()
Sheets("Portfolio-Details").[D:D].EntireColumn.Hidden = Not CheckBox1
End Sub

In the above code, Portfolio-Details is the name of the sheet2.

Please help me in hiding the check-box as well which are present in that Column, Also could you please let me know how to add code in the above code, to hide the sheet3, for the check box selected. I am totally new to Excel, Thanks in advance.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,249
Members
452,623
Latest member
Techenthusiast

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