Hello - I've done a lot of searching on various forums but I'm unable to figure out why my code isn't working. I am trying to have a tab show up as visible in the workbook if "Yes" is selected in another cell. If "No" or nothing is selected in the dropdown, I want the tab to remain hidden. I keep getting run-time error 9 and I'm not sure what I need to change to get it to work. Any assistance is greatly appreciated. Thanks!
VBA Code:
Sub Tab_Prompts()
If Sheet1.Range("H16") = "Yes" Then
Worksheets("Sheet9").Visible = True
Else
Worksheets("Sheet9").Visible = False
End If
End Sub