Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can i align an column object in excel
Message
 
To
23/07/1999 17:49:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00245308
Message ID:
00246049
Views:
16
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform