Unhide Tab in Excel

Solved/Closed
Michael - Nov 6, 2011 at 03:27 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Dec 1, 2011 at 09:38 AM
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 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Dec 1, 2011 at 09:38 AM
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
0