dparteka
Member
I have a workbook with 10 worksheet tabs labeled 01-10, 11-20, 21-30 and so on up to 91-100. The first macro below places an "M" in cell '01-10'!AM4, the second macro removes the "M". These macros work only in worksheet 01-10, I need the macros to run from all of the worksheets and to not change the active worksheet and cell. Here's an example on how it needs to work... my curser is in cell '41-50'!A1, I run the first macro which places an "M" in the '01-10'!AM4 cell but my worksheet tab and curser never leave cell '41-50'!A1.
Sub MetricOn()
Application.EnableEvents = True
Range("'01-10'!AM4").Select
ActiveCell.FormulaR1C1 = "M"
End Sub
Sub MetricOff()
Application.EnableEvents = False
Range("'01-10'!AM4").Select
ActiveCell.FormulaR1C1 = ""
End Sub
Sub MetricOn()
Application.EnableEvents = True
Range("'01-10'!AM4").Select
ActiveCell.FormulaR1C1 = "M"
End Sub
Sub MetricOff()
Application.EnableEvents = False
Range("'01-10'!AM4").Select
ActiveCell.FormulaR1C1 = ""
End Sub