General information
Category:
Coding, syntax & commands
Title:
Correct VFP syntax for Excel copy command
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only