Hide Check Box base on another cells data

MitchOwen

New Member
Joined
Jul 9, 2019
Messages
4
Hi I looked at other threads that cover this but can't seem to get any of their suggestions to work.

I have a cell K14 that has a list of 3 options:

Pre_Finished
_2_Pac
Veneer

I have a check box that i want to hide when "Pre_Finished" is selected but available for checking when "_2_Pac" or "Veneer" are selected.

My coding knowledge is extremley basic.

Thank you for your help!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("K14")) Is Nothing Then
        If Target.Value = "Pre_Finished" Then
            ActiveSheet.Shapes.Range(Array("Check Box 1")).Visible = False
        Else
            ActiveSheet.Shapes.Range(Array("Check Box 1")).Visible = True
        End If
    End If
End Sub
 
Upvote 0
Thank you KOKOSEK

I opened VBA (Alt+F11) and insert a new module and pasted in your code but nothing happens? Do i need to record a macro first?
 
Upvote 0
you can paste this code straight into Sheet code not into Module.
 
Upvote 0
Thank you KOKOSEK

I think i have done it right but the check box is not hiding. My check box is defined "Checkbox2" and i updated that info in the code.

My steps are:

1. right click on the sheet and select view code
2. paste your code and update to "Checkbox2"
3. save and close

Is this right? I really appreciate your guidance.
 
Upvote 0
You have written:
Code:
[COLOR=#333333]I have a cell K14 that has a list of 3 options:[/COLOR]
so I expect that in K14 is dropdown list.
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,108
Members
452,544
Latest member
aush

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