Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Moving Worksheets from one book to another
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Moving Worksheets from one book to another
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01335195
Message ID:
01335195
Vues:
50
I have used the following code from "Microsoft Office Automation with Visual Foxpro" by Tamar Granor but I can't it to work
loTempWorkBook = CREATEOBJECT("Excel.Application")
loTempWorkBook.Workbooks.Open("C:\Dev\Questback\Data\Invicta\Repairs(REP)\"+DTOS(DATE()-1)+"RSLSummary.xls")
loTempWorkBook.Visible = .T.
loMTWorkBook = CREATEOBJECT("Excel.Application")
loMTWorkBook.Workbooks.Open("C:\Dev\Questback\Data\Invicta\Repairs(REP)\"+DTOS(DATE()-1)+"RepairURL.xls")
loMTWorkBook.Visible = .T.

loTempWorkBook.Worksheets(1).Move(loMTWorkBook.ActiveSheet)    && Error on this line 

loMTWorkBook.SaveAs = ("C:\Dev\Questback\Data\Invicta\Repairs(REP)\"+DTOS(DATE()-1)+"RepairURL.xls")
RELEASE loTempWorkBook
Error Message:

OLE IDespatch exception code 0 from Microsoft Office Excel:
Unable to get the move property of the Worksheet class

Is there something missing in the move syntax? Can any one help? Is there another way to do this?
Regards

Tony Millard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform