[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Excel Automation Paste

Posted on 2010-01-08
1
Medium Priority
?
243 Views
Last Modified: 2012-05-08
I have it down to where I open one sheet select the cells an copy

next open another sheet and slect cells and PASTE,
BUT I get the OLE Error of Unknown Name, 0x080020006

on the last line of code: oExcel.ActiveSheet.Past

I have down the macro and referenced other articles but I keep error on the past part for some reason...

Thanks
oExcel = CREATEOBJECT("Excel.Application")
oExcel.Visible = .T.
oWorkBookT = oExcel.WorkBooks.Open("C:\AdminErrorCheck\Templates\family_headers.xls")
oRangeT = oExcel.ActiveSheet.Range("A1:DG1").Select
oExcel.Selection.Copy

*Activate and copy to the final report
oWorkBookF = oExcel.WorkBooks.Open("c:\marketing_target_ALL_customers.xls")
oExcel.Visible = .T.
oRangeF = oExcel.ActiveSheet.Range("A1:DG1").Select
oExcel.ActiveSheet.Past

Open in new window

0
Comment
Question by:jaymz69
1 Comment
 
LVL 43

Accepted Solution

by:
pcelba earned 2000 total points
ID: 26211755
oExcel.ActiveSheet.Paste

If you assign
oas = oExcel.ActiveSheet

then you should see intellisense help after typing   oas.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question