Results 1 to 4 of 4

Borders Object

Threaded View

DejaVu Borders Object 06-29-2005, 11:03 AM
DejaVu Just keeping this thread... 06-29-2005, 05:03 PM
Guest Re: Borders Object 06-29-2005, 07:05 PM
DejaVu Thanks Peter T... Very... 06-30-2005, 05:24 PM
  1. #1
    Registered User
    Join Date
    04-25-2005
    Posts
    99

    Borders Object

    Just a quick question about formatting borders. I'm working on cleaning up some old code created by other programmers.
    This is what they had:


    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = xlAutomatic
    End With
    With Selection.Borders(xlEdgeTop)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = xlAutomatic
    End With
    .... and it goes on and on like this...

    This is what I've changed it to:
    Selection.Borders(xlInsideVertical).LineStyle = xlContinuous
    Selection.Borders(xlInsideVertical).Weight = xlThin
    Selection.Borders(xlInsideHorizontal).LineStyle = xlContinuous
    Selection.Borders(xlInsideHorizontal).Weight = xlThin
    Selection.Borders(xlEdgeLeft).LineStyle = xlContinuous
    Selection.Borders(xlEdgeLeft).Weight = xlMedium
    Selection.Borders(xlEdgeTop).LineStyle = xlContinuous
    Selection.Borders(xlEdgeTop).Weight = xlMedium
    Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous
    Selection.Borders(xlEdgeBottom).Weight = xlMedium
    Selection.Borders(xlEdgeRight).LineStyle = xlContinuous
    Selection.Borders(xlEdgeRight).Weight = xlMedium

    What I'm wondering, is if I need the xlContinuous portion of LineStyle? I changed my code to this:
    Selection.Borders(xlInsideVertical).Weight = xlThin
    Selection.Borders(xlInsideHorizontal).Weight = xlThin
    Selection.Borders(xlEdgeLeft).Weight = xlMedium
    Selection.Borders(xlEdgeTop).Weight = xlMedium
    Selection.Borders(xlEdgeBottom).Weight = xlMedium
    Selection.Borders(xlEdgeRight).Weight = xlMedium

    And it seems to do the same thing. I don't, however, know if this will cause any issues in the future, or if it is a very good way to handle this? Any input is greatly appreciated!!


    Thanks,

    DejaVu
    Last edited by DejaVu; 06-29-2005 at 05:02 PM. Reason: Shorten the post

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1