Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can i align an column object in excel
Message
 
À
23/07/1999 17:49:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00245308
Message ID:
00246049
Vues:
23
>i tried your solution but somehow it doesn't work.
>
>i want to leftalign my column .
>
>regards,
>David van der vliet

Hello David,

You have to set IndentLevel property also.

Here is the sample code:
PUBLIC ox
ox = CREATEOBJECT('excel.application')
ox.WorkBooks.ADD()
ox.VISIBLE = .T.

ox.ActiveWorkbook.Worksheets(1).Activate()

WITH ox.ActiveWorkbook.ActiveSheet 
.cells(1,1) = 123
.cells(2,1) = 456
.cells(3,1) = 789
ENDWITH

ox.ActiveWorkbook.ActiveSheet.Columns('A:A').Select()
WITH ox.Selection
        .HorizontalAlignment = -4152 &&  xlLeft
       .IndentLevel = 0
ENDWITH
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform