Unhide Tab in Excel

[Solved/Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,

I have a cell in excel that is either true or false. Based on that then it is linked to a check box. When ever I type the word "True" it marks the check box, but does not unhide the tab unless I physically click on the box.

I would like it if the box is checked based on the text linked to it checks it, to unhide the tab labeled "Affidavit". Here is the macro code I have assigned to the check box:

Sub CheckBox7_Click()
Dim s As String, cbx As CheckBox
s = Application.Caller
Set cbx = ActiveSheet.CheckBoxes(s)
If cbx.Value = xlOn Then
Worksheets("Affidavit").Visible = xlSheetVisible
Sheets("Data Entry").Select
Else
Worksheets("Affidavit").Visible = xlSheetHidden
End If
End Sub


Thanks.



1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I think that because the event is not trigger.ed May be you can manually call the event
For that I am thinking you may need to code for

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub