Results 1 to 4 of 4
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Line Weight ((Excel97/SR2))

    The VBA help screens for Weight Property tell me "Returns or sets the weight of the border. Can be one of the following XlBorderWeight constants: xlHairline, xlThin, xlMedium, or xlThick. Read/write Long."

    However, accidental experimentation shows me that a value of 44 is possible.

    debug.print gives me the following values:

    Debug.Print xlHairline 1
    Debug.Print xlThin 2
    Debug.Print xlMedium -4138
    Debug.Print xlThick 4

    Have I misunderstood the help screens? I'm rather tickled about this, because I thought I'd have to pro-rate molecular bond weights to a range of 1:4, losing some information along the way.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Line Weight ((Excel97/SR2))

    In XL97 I can not make a border have a weight of 44.

    I can make an autoshape have a variable border from 0 to 1584 pts (to 0.01 pts), so you could "draw" a line instead of a border and set the size as desired.

    Steve

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Line Weight ((Excel97/SR2))

    > In XL97 I can not make a border have a weight of 44

    Thanks; you're right.

    My confusion stems from the sequence in the Help files. In the code below i click in the word 'Weight" in the line ".Line.Weight = 44" and get a misleading help screen!


    <pre>Public Function FormatMyShape(shp As Shape, lngForeColour As Long)
    With shp
    ''' FILL
    .Fill.Visible = msoTrue
    .Fill.Solid
    .Fill.Transparency = 0
    ''' LINE
    Debug.Print xlHairline
    Debug.Print xlThin
    Debug.Print xlMedium
    Debug.Print xlThick
    .Line.Weight = 44
    .Line.DashStyle = msoLineSolid
    .Line.Style = msoLineSingle
    .Line.Transparency = 0#
    .Line.Visible = msoTrue
    .Line.ForeColor.SchemeColor = lngSchemeRand
    End With
    End Function
    </pre>


  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Line Weight ((Excel97/SR2))

    Line.weight is different than a border.weight

    As I mentioned the line.weight can be a large number (158,400) of values while the border.weight can only be 4.

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •