Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add a new sheet in a worksheet in VPF9 ?
Message
De
02/01/2016 04:24:00
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
02/01/2016 00:00:25
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01629519
Message ID:
01629521
Vues:
51
>Hi,
>
>I open a workseet in VFP 9, there are 1 sheet only,
>and I want to add a new sheet after the existing worksheet.
>
>I found the Excel Macro command is
> Sheets.Add After:=Sheets(Sheets.Count)
>
>how to convert it VFP 9 coding ?

It's a named parameter, you need to see in VBA help the exact order of parameters (perhaps it's the only one) and any parameters before it, or at least supply the proper number of commas. Assume that After is the third parameter, then this would be

oExcel.workbook.sheets.add(,,oExcel.workbook.sheets.count)

I don't have Excel on my machines so can't tell you which one exactly. You may find out by either by digging through VBA help in Excel, or by suspending your code before that command and then trying out in command window - Intellisense will read Excel's DOM and will show you the list of parameters when you open the parenthesis.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform