A question of Excel...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • |\\/|onkey

    A question of Excel...

    Howdy all

    I currently have a program in VB6.0 (with all the correct Project Refs
    included) that creates an excel spreadsheet.
    This program runs fine, inserts all the correct data in the correct
    places....the problem I am having is this....

    How can i have a gridline that only draws the OUTER LINES of the box, not
    the internal lines as well...I've tried everything...

    Range("A3").Bor ders.Value = xlEdgeLeft
    Range("A3:AE14" ).Borders.Value = xlEdgeLeft

    despite that, it draws all the internal lines as well...Im stuck...please
    help....

    Running XP and office XP

    Thanks


  • NW FLA JEEP

    #2
    Re: A question of Excel...

    When learning Word or Excel coding let the application teach you.
    Simply turn on record macro, do what you want, stop the recorder
    and then open the visual basic editor and see what the code is.

    Take Care
    Charlie

    Example code is below:

    Range("E7:G13") .Select
    Selection.Borde rs(xlDiagonalDo wn).LineStyle = xlNone
    Selection.Borde rs(xlDiagonalUp ).LineStyle = xlNone
    With Selection.Borde rs(xlEdgeLeft)
    .LineStyle = xlContinuous
    .Weight = xlMedium
    .ColorIndex = xlAutomatic
    End With
    With Selection.Borde rs(xlEdgeTop)
    .LineStyle = xlContinuous
    .Weight = xlMedium
    .ColorIndex = xlAutomatic
    End With
    With Selection.Borde rs(xlEdgeBottom )
    .LineStyle = xlContinuous
    .Weight = xlMedium
    .ColorIndex = xlAutomatic
    End With
    With Selection.Borde rs(xlEdgeRight)
    .LineStyle = xlContinuous
    .Weight = xlMedium
    .ColorIndex = xlAutomatic
    End With
    Selection.Borde rs(xlInsideVert ical).LineStyle = xlNone
    Selection.Borde rs(xlInsideHori zontal).LineSty le = xlNone

    "|\/|onkey" <lppl@ber.co.uk > wrote in message
    news:aya1b.183$ ln6.17@news-binary.blueyond er.co.uk...[color=blue]
    > Howdy all
    >
    > I currently have a program in VB6.0 (with all the correct Project Refs
    > included) that creates an excel spreadsheet.
    > This program runs fine, inserts all the correct data in the correct
    > places....the problem I am having is this....
    >
    > How can i have a gridline that only draws the OUTER LINES of the box, not
    > the internal lines as well...I've tried everything...
    >
    > Range("A3").Bor ders.Value = xlEdgeLeft
    > Range("A3:AE14" ).Borders.Value = xlEdgeLeft
    >
    > despite that, it draws all the internal lines as well...Im stuck...please
    > help....
    >
    > Running XP and office XP
    >
    > Thanks
    >
    >[/color]


    Comment

    • Smokey

      #3
      Re: A question of Excel...

      Try:

      With Range("A3:AE14" )
      .Borders(xlEdge Top).LineStyle = xlContinuous
      .Borders(xlEdge Left).LineStyle = xlContinuous
      .Borders(xlEdge Bottom).LineSty le = xlContinuous
      .Borders(xlEdge Right).LineStyl e = xlContinuous
      End with


      "|\/|onkey" <lppl@ber.co.uk > wrote in message
      news:aya1b.183$ ln6.17@news-binary.blueyond er.co.uk...[color=blue]
      > Howdy all
      >
      > I currently have a program in VB6.0 (with all the correct Project Refs
      > included) that creates an excel spreadsheet.
      > This program runs fine, inserts all the correct data in the correct
      > places....the problem I am having is this....
      >
      > How can i have a gridline that only draws the OUTER LINES of the box, not
      > the internal lines as well...I've tried everything...
      >
      > Range("A3").Bor ders.Value = xlEdgeLeft
      > Range("A3:AE14" ).Borders.Value = xlEdgeLeft
      >
      > despite that, it draws all the internal lines as well...Im stuck...please
      > help....
      >
      > Running XP and office XP
      >
      > Thanks
      >
      >[/color]


      Comment

      Working...