Passing parameters to VB

koia ingmar.ko.andersson at glocalnet.net
Sun Mar 19 18:22:04 EST 2006


Hi,

I am using win32com for the Python interface to my Excel shreadsheets.

When I turn on Macro recordiong in Excel while filling a rectangle with
text information, a part of the VB code produced is the following:

    With Selection.Characters(Start:=1, Length:=11).Font
        .Name = "Arial"
        .FontStyle = "Normal"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic

What is the syntax for passing the parameters Start:=1, Length:=11 to
VB from a Python function, if I want to control these properties of the
text in the Excel spreadsheet?

Thanks in advance!

/ koia




More information about the Python-list mailing list