Hi Everyone, I'm new to macros and need some help please!
I'm trying to hide/unhide worksheets based on a cell value.
For example I have entered the below which successfully works:
Private Sub Worksheet(VAT)
If [I29] = "Yes" Then
Sheets("VAT Reg").Visible = True
Else
Sheets("VAT Reg").Visible = False
End If
End Sub
However, I need to add two more:
1) If cell T16 = "Yes" hide "Company_Reg"
If not "Company_Reg" is visible
2) If cell I43 = "Yes" visible "Bank Details"
If cell I43 - "No" hide "Bank Details"
I've tried adapting the above code (which I found whilst endlessly googling!) but with no success!
Any help would be much appreciated
I'm trying to hide/unhide worksheets based on a cell value.
For example I have entered the below which successfully works:
Private Sub Worksheet(VAT)
If [I29] = "Yes" Then
Sheets("VAT Reg").Visible = True
Else
Sheets("VAT Reg").Visible = False
End If
End Sub
However, I need to add two more:
1) If cell T16 = "Yes" hide "Company_Reg"
If not "Company_Reg" is visible
2) If cell I43 = "Yes" visible "Bank Details"
If cell I43 - "No" hide "Bank Details"
I've tried adapting the above code (which I found whilst endlessly googling!) but with no success!
Any help would be much appreciated