copy data from one workbook to another using macro
Posted by Lee on September 21, 2000 12:53 PM
I use a macro to copy data from one workbook (History.xls) to another (corvette.xls) as shown below. Can I use another command to paste the data onto the "Corvette.xls" workbook. My problem is if I rename "Corvette.xls" my macro will no longer work.
Workbooks.Open Filename:="\\test\port\History.xls"
Range("A1:K60000").Select
Selection.Copy
Windows("corvette.xls").Activate
Application.Goto Reference:="historicaltradespointer"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("A24").Select
Windows("TradeHistory.xls").Activate
ActiveWorkbook.Close