Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correct VFP syntax for Excel copy command
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Correct VFP syntax for Excel copy command
Miscellaneous
Thread ID:
00177524
Message ID:
00177524
Views:
80
I'm using VFP 5.0a/Excel 97 and trying to copy a worksheet in Excel from VFP. I recorded the action using the Macro recorder and got the following command.


Sheets("Sheet1").Copy After:=Sheets(1)


My VFP code looks something like this so far.

* Create a reference to Excel
objExcel = CreateObject("Excel.Application")

Then I have some code to create a spreadsheet and then I would like to copy that worksheet to save a little time.

I can't figure out how to send the two parts of the Excel command in VFP without a syntax error.

TIA
Reply
Map
View

Click here to load this message in the networking platform