I have a macros to hide and unhide my "Contra_submittal" sheet based on a cell value. On my "Checklist" sheet, I created a spread sheet using checkbox applications. I also applied a macros button to my "Checklist" sheet. By clicking on the macros button it's suppose to opens 2 files to retrieve formulas, pictures, and results depending on the check box selection. It gives me a Run-time error '9' Subscript out of range message. The macros button does not fully function. It only opens 1 of the 2 files. I click on Debug to find the error. The formula below is my hide and unhide macros, which I don't think has anything to do with my button macros. Worksheets("Contra_submittal").Visible = xlSheetVisible is highlighted. When I remove the macros shown below, my button macros works very well, but I really need the formula below to hide a sheet if it's not needed. It only happens to buttons with a macros that opens files. Gratitude to anyone who can assist me. I hope my explanation is clear. The macros below is under my "Contra_submittal" sheet.
Formula: copy to clipboard
Private Sub Worksheet_Calculate()
If [A38] = "False" Then
Worksheets("Contra_submittal").Visible = xlVeryHidden
Else
Worksheets("Contra_submittal").Visible = xlSheetVisible
End If
End Sub