Activate a workbook?
I added a line
Workbooks("Walk Index.xlsm").Work.Activate
at the end of my copying macro, to ensure that the workbook 'Walk Index'
was in focus:
--------------------
Sub CopyTrackSheetToWalkIndex()
'40 or so cells copied to appropriate column of Walk Index.
Sheets("Track Data").Range("B5").Copy Destination:=Workbooks("Walk
Index.xlsm").Sheets("TEMP").Range("C2")
Sheets("Track Data").Range("B10").Copy Destination:=Workbooks("Walk
Index.xlsm").Sheets("TEMP").Range("J2")
'etc
Workbooks("Walk Index.xlsm").Work.Activate
End Sub
--------------------
But it failed with the error
Run-time error '438':
Object doesn't support this property or method
What was my mistake please?
Terry, East Grinstead, UK
|