Hi,
I have a common Sub called for several sheets when calculate event fires, so the code inserted is:
I cannot use Call Drawing(Activesheet) because Activesheet is the sheet firing all 3 events at once, not the sheet actually performing mycode.
Any idea how to get the adequate index?
Thks
I have a common Sub called for several sheets when calculate event fires, so the code inserted is:
Code:
Private Sub Worksheet_Calculate() ' On Sheet number 2
Call Drawing(2)
End Sub
Private Sub Worksheet_Calculate() ' On Sheet number 5
Call Drawing(5)
End Sub
Private Sub Worksheet_Calculate() ' On Sheet number 6
Call Drawing(6)
End Sub
Sub Drawing(Sh As integer) ' On a Module
.... mycode here
.... Worksheets(sh). used as Sheet to get info and perform operations
End Sub
I cannot use Call Drawing(Activesheet) because Activesheet is the sheet firing all 3 events at once, not the sheet actually performing mycode.
Any idea how to get the adequate index?
Thks
Last edited: