-
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks