Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel superscript
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01223124
Message ID:
01223130
Vues:
15
>>Is it possible to insert text into a cell in oExcel which has a superscript associated with it? Something like:
>>
>>
>>oExcel.range('A1').value = "Textwithsuperscript" + somecontrolcode + '1'
>>
>>
>>So that to '1' shows up as a superscripted character. I think this should be possible since you can have multiple fonts in a cell, but how to accomplish it is a mystery (to me).
>>
>>Thanks
>
>With a macro:
>
>With ActiveCell.Characters(Start:=1, Length:=5).Font
>        .Name = "Arial"
>        .FontStyle = "Regular"
>        .Size = 10
>        .Strikethrough = False
>        .Superscript = False
>        .Subscript = False
>        .OutlineFont = False
>        .Shadow = False
>        .Underline = xlUnderlineStyleNone
>        .ColorIndex = xlAutomatic
>    End With
>    With ActiveCell.Characters(Start:=6, Length:=5).Font
>        .Name = "Arial"
>        .FontStyle = "Regular"
>        .Size = 10
>        .Strikethrough = False
>        .Superscript = True
>        .Subscript = False
>        .OutlineFont = False
>        .Shadow = False
>        .Underline = xlUnderlineStyleNone
>        .ColorIndex = xlAutomatic
>    End With
>    Range("D17:D18").Select
>    Range("D18").Activate
>    Application.CommandBars("Stop Recording").Visible = False
>    Range("A2").Select
>End Sub
I think this is fully translatable in VFP :-) )(not tried though).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform