Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Automation Help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00891618
Message ID:
00892976
Vues:
34
I should mention that in this case I'm pushing cells to the right (instead of down as in the first macro).

>That was excellent and worked as advertised, but when I try to apply the same technique on another spreadsheet, I get the error: "Unable to get the Insert property of the Range class"
>
>The working excel macro is:
>
>    Range("B3:C31").Select
>    Selection.Copy
>    Selection.Insert Shift:=xlToRight
>
>
>And my attempted VFP code to do the same thing is:
>
>oExcel.WorkBooks.Open(THISFORM.cdatapath+[YugiohTemplate.xls])
>oRecapSheet = oExcel.Activesheet
>#Define xlShiftRight -4152
>WITH oRecapSheet
>    FOR i = 3 TO nColumnCount STEP 2
>	.Range("B3:C31").Copy
>	.Range("B3:C31").Insert(xlShiftRight)
>    NEXT
>ENDWITH
>
>
>Can you tell me what I'm missing?
>
>Much thanks in advance!
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform