Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Sheets
Message
De
30/04/2004 12:50:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
30/04/2004 12:22:05
Jobert Tolentino
Transcontinental Direct
Etobicoke, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00899822
Message ID:
00899833
Vues:
13
>Hello,
>
>I'm trying to automate the creation of a workbook by inserting specific sheets from different workbooks. There is a problem in the syntax of my move which I can't seem to pinpoint.
>
>
>My code:
>myExcel.Application.Workbooks(2).Sheets(1).Move ;
> After:=myExcel.Application.Workbooks(1).Sheets(1)
>
>Thanks in advance!

Syntax is :
Worksheet.Move(Before,After) and you can only specify either Before or After parameter. VFP uses positional parameters not named parameters like ( After: = .... )
oExcel = CreateObject('Excel.Application')
WITH oExcel
  .Workbooks.Add
  .Visible = .t.
  With .Activeworkbook
   .WorkSheets("Sheet1").Move(.null.,.WorkSheets("Sheet3")) && Move After
  endwith
ENDWITH
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform