Reputation: 5
I currently have this code
Private Sub Worksheet_Change(ByVal Target As Range)
WorksheetChanged(Target, Range("AB3").CurrentRegion, Range("B18:B19"))
WorksheetChanged(Target, Range("AE3").CurrentRegion, Range("B20:B21"))
End Sub
But it throws me a "Compile Error: Expected =", I have no idea why and I don't know where an = would go, any help? Thank you in advance.
Upvotes: 0
Views: 68
Reputation: 91376
If you want to use brackets, you need to assign to a variable or in some cases, use Call, if you do not need to assign, skip the brackets:
WorksheetChanged Target, Range("AB3").CurrentRegion, Range("B18:B19")
Upvotes: 3