Results 1 to 4 of 4

clear all borders using VBA

This is a discussion on clear all borders using VBA within the Excel Questions forums, part of the Question Forums category; is there a way to clear all borders of a range rather than using code that looks like this: Selection.Borders(xledgeright).LineStyle ...

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Philadelphia
    Posts
    100

    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

    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

    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

    Default

    yes, thats exactly what i needed, thanks.

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