clear all borders using VBA

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: clear all borders using VBA

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Philadelphia
    Posts
    100
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    is there a way to clear all borders of a range rather than using code that looks like this:

    Selection.Borders(xledgeright).LineStyle = xlNone
    Selection.Borders(xledgeleft).LineStyle = xlNone

    etc...

    it also would need to clear the border "in the middle" of a large square range.

    thanks for any help you can give me

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    SRC
    Posts
    165
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    try like this

    Range("A1:N12").Borders(xledgeright).LineStyle = xlNone
    Range("A1:N12").Borders(xledgeleft).LineStyle = xlNone

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Phoenix, Arizona
    Posts
    1,711
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You should be able to clear all boarders with just this one line. Is that what you are trying to do?

    Selection.Borders.LineStyle = xlNone

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    Philadelphia
    Posts
    100
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    yes, thats exactly what i needed, thanks.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com