Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to group shapes in Excel by automation
Message
De
18/10/2005 05:18:39
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
How to group shapes in Excel by automation
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01059852
Message ID:
01059852
Vues:
56
Hello everyone

I have a situation in which I want my program to group a set of shapes in Excel into one group. The shapes are textboxes. In order to do this, I started the macro recorder, built 2 textboxes,grouped them, switched to view the macro,and implement the code in my VFP program.
Essentially (left some unimportant propsettings out) this is the macro code:
    ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 51#, 48#, 60# _
        , 16.5).Select
    ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 51#, 64.5, 60# _
        , 16.5).Select
    ActiveSheet.Shapes.Range(Array("Text Box 2", "Text Box 1")).Select
    Selection.ShapeRange.Group.Select
It is easy enough to automate the first two statements and the fourth by VFP, but the third I cannot do, because of the ARRAY-call.
If I put the two strings "Text Box 2" and "Text Box 1" in a VFP array and give the array as an argument to Range() it doesn't work.

So how to do this in VFP?

Lennert
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform