I have the following worksheet macro operating on one worksheet:-
- Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
10 If Range("AA1") = "Copy" Then
20 Application.Goto Reference:="A5:X20"
30 Selection.Copy
40 Sheets("Sheet 1").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlValues
50 Application.CutCopyMode = False
60 Range("A1").Select
70 Else
80 End If
End Sub
Cell AA1 is a formula that returns either 'Copy' or 'No Copy', and controls how often data will be copied, or stop copying if the market is Suspended.
How do I get this (or similar) macro to operate on each and every worksheet so there is no conflict between the worksheets?
Realise the problem is probably row 30,40 & 60 but my skills on writing macros tend to be Record macro then do a bit of manual editting
