Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Macro to produce Thick Border Box

  1. #11
    Member
    Join Date
    Aug 2012
    Posts
    40
    Rep Power
    0
    Thanks for help, much appreciated

    I have added the following code to clear the borders at the beginning of the code.

    It would be appreciated if you would streamline this

    Code:
     With Range("A:D")
    
     .Borders(xlDiagonalDown).LineStyle = xlNone
        .Borders(xlDiagonalUp).LineStyle = xlNone
        .Borders(xlEdgeLeft).LineStyle = xlNone
        .Borders(xlEdgeTop).LineStyle = xlNone
        .Borders(xlEdgeBottom).LineStyle = xlNone
       .Borders(xlEdgeRight).LineStyle = xlNone
        .Borders(xlInsideVertical).LineStyle = xlNone
        .Borders(xlInsideHorizontal).LineStyle = xlNone
    
    End With

  2. #12
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    13
    Code:
        Dim b As Variant
        For Each b In Array(xlDiagonalDown, xlDiagonalUp, xlEdgeLeft, xlEdgeTop, _
                xlEdgeBottom, xlEdgeRight, xlInsideVertical, xlInsideHorizontal)
            Range("A:D").Borders(b).LineStyle = xlNone
        Next

  3. #13
    Member
    Join Date
    Aug 2012
    Posts
    40
    Rep Power
    0
    Thanks for the help, much appreciated

  4. #14
    Junior Member
    Join Date
    Aug 2014
    Posts
    10
    Rep Power
    0
    If you don't actually need the diagonals:

    Code:
    Range("A:D").Borders.LineStyle = xlNone

  5. #15
    Member
    Join Date
    Aug 2012
    Posts
    40
    Rep Power
    0
    Thanks Scott, The diagonals, slow down the process tremendously

    Have tested code and is super fast

Similar Threads

  1. List box tabbing
    By RedJames in forum Excel Help
    Replies: 1
    Last Post: 06-18-2014, 04:14 PM
  2. Replies: 3
    Last Post: 06-01-2013, 11:31 AM
  3. Excel VBA Macro To Open A File Through Browse Dialog Box
    By Safal Shrestha in forum Excel Help
    Replies: 2
    Last Post: 04-05-2013, 12:59 PM
  4. OpenFileDialog box malfunctions
    By hometech in forum Word Help
    Replies: 1
    Last Post: 10-22-2012, 04:15 PM
  5. Setting up a check box
    By Howardc in forum Excel Help
    Replies: 2
    Last Post: 08-07-2012, 08:26 AM

Posting Permissions

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