Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Autoformation in Excel (Individual cells alignment)
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01185017
Message ID:
01187802
Views:
20
>i only got around to trying this on friday but could not get it working. roughly below i have copied some of what i tried. i did all this in the command window which does not allow with to be used. the first 5 lines work ok but everything after that fails, i get told off by excel, telling me that range does not allow this.
>
>oleApp = CreateObject("Excel.Application")
>OleApp.Visible = .T.
>OleApp.WorkBooks.Add
>lncounter = 3
>OleApp.cells(lnCounter,3).value   = "ID"
>Oleapp.Cells.HorizontalAlignment = -4107
>Oleapp.Selection.HorizontalAlignment = -4107
>OleApp.cells(lnCounter,3).HorizontalAlignment = -4107
>
>on that other note, they did not let themselves down on saturday, is second place calling?
>~M
I can not make it to work either and I tried all possible combinations I can think of. It works fine in Excel, though:
 Range("C3").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform