General information
Category:
COM/DCOM and OLE Automation
Whoops!! Then change the oW.ActiveSheet.Paste line to read oRange.Paste.
Alan
>Probably better to do it in code. After the 'oRange=' line, add a line: oRange.Select()
>
>Alan
>
>>I fixed it by moving the cursor into the right cell in the template.
>>
>>
>>
>>>I have a Excel Spreadsheet with headers and formats but no data.
>>>
>>>inVFP I crate a curser then:
>>>_VFP.DataToClip(,,3)
>>>
>>>oE=CREATE("Excel.Application")
>>>oW=oE.Workbooks.Open("MYTEMPLATE.xls")
>>>oRange=oe.activeSheet.Range("A7:V7")
>>>oW.ActiveSheet.Paste
>>>
>>>ANd it inserts starting at cell A2 instead of A7 thus overwriting my headers
>>>
>>>
>>>What am I doing wrong???
>>>
>>>Thanks
>>>
>>>Peter
Previous
Next
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