-
copy paste fails on second use, CSV
'Copy Dates
objStockDataWB.Sheets("table").Range("B1:B" & LastRow).Select 'includes the Symbol
selection.Copy
'Paste Dates
Set objHomersWB = objExcel.Workbooks.open(HomersWorkBookPath) 'Homer's target spread sheet
objHomersWB.Sheets("Sheet1").Range("A1:A" & LastRow).Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
On Error GoTo errorhandler2
'copy closing prices
objStockDataWB.Sheets("table").Range("E2:E" & LastRow).Select
THE ABOVE LINE FAILS, IS IDENTICAL TO PRIOR COPY/PASTE, COL. E SAME LENGTH AS COL. A, ERROR 1004
On Error GoTo errorhandler1
selection.Copy
'paste closing prices
'Set objHomersWB = objExcel.Workbooks.open(HomersWorkBookPath)
objHomersWB.Sheets("Sheet1").Range("B2:B" & LastRow).Select
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
SEE THREAD: CreateObject problem for a CVS file
Winnie_the_Pough
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|