I am using worksheet change event to trigger copy paste values. Worksheet change code is in the sheet2
Sub worksheet_change(ByVal Target As Range)
Application.EnableEvents = True
Set Target = Range("AB2")
If Target.Value = "OK" Then
Call myTR1
End If
Please note AB2 cell takes it's value from another sheet
Copy paste code is in a Module
Sub myTR1()
Sheets("BA1").Range("AR6:AS8").Value = Sheets("BA1").Range("AL17:AM19").Value
End Sub
When target range changes to "OK", my copy paste macro is not triggering. What am I doing wrong?
worksheet_change
has smallw
and smallc
so I am guessing the code is in a module and not the relevant worksheet – Siddharth RoutTarget
, for exampleTargetCell
. Isn't it 'special' word in VBA? – TeamothyPlease note AB2 cell takes it's value from another sheet
OH DAMN!!!! I just noticed... In this caseWorksheet_Change
will not work – Siddharth RoutWorksheet_Calculate()
point of view – Siddharth Rout