Hi All, I'm not so good at VBA. I have a sheet with multiple tabs and lots of calculations. I've found it necessary to switch off and on auto-calculation on some tabs so the sheet can perform better. The 1st code below works fine but I'm hoping to use the same macro to turn off and on auto calculate on another TAB at the same time. My modified code isn't doing it. Would appreciate all advice. FYI the worksheets are called ASX_Data and Analysis
SO THIS WORKS WITH 1 SHEEET IN THE WORKBOOK
Sub TurnOff()
Worksheets("ASX_Data").EnableCalculation = False
MsgBox ("AutoCalc Is OFF")
End Sub
Sub TurnOn()
Worksheets("ASX_Data").EnableCalculation = True
MsgBox ("AutoCalc Is ON")
End Sub
THIS DOESN'T WORK
Sub TurnOff()
Worksheets("ASX_Data, Analysis").EnableCalculation = False
MsgBox ("AutoCalc Is OFF")
End Sub
Sub TurnOn()
Worksheets("ASX_Data,Analysis").EnableCalculation = True
MsgBox ("AutoCalc Is ON")
End Sub
SO THIS WORKS WITH 1 SHEEET IN THE WORKBOOK
Sub TurnOff()
Worksheets("ASX_Data").EnableCalculation = False
MsgBox ("AutoCalc Is OFF")
End Sub
Sub TurnOn()
Worksheets("ASX_Data").EnableCalculation = True
MsgBox ("AutoCalc Is ON")
End Sub
THIS DOESN'T WORK
Sub TurnOff()
Worksheets("ASX_Data, Analysis").EnableCalculation = False
MsgBox ("AutoCalc Is OFF")
End Sub
Sub TurnOn()
Worksheets("ASX_Data,Analysis").EnableCalculation = True
MsgBox ("AutoCalc Is ON")
End Sub