All Borders equivalent in Excel for a range
17,094
I don't know a more efficient way than this.
With Range("A1:R780")
.Borders(xlInsideVertical).LineStyle = xlContinuous
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
.BorderAround xlContinuous
End with
Tough I belive this would also work.
Range(“A1:R780").Borders.LineStyle = xlContinuous
Related videos on Youtube
Comments
-
Crazyd almost 2 years
I would think there is a way in VBA to put the 4 wall borders for every cell in a range, but I have yet to figure out or find one. Basically I want a range such as (A1:R780) to all have their own square.
-
Musselman over 8 yearspossible duplicate stackoverflow.com/questions/13121425/…
-
Crazyd over 6 yearsSimpler question didn't look on Stack Over Flow due to not really a programming question as I see it.
-
-
Crazyd over 8 yearsThanks I actually found a much more complex way of doing it.... probably 10 minutes before you answered... just now checked to see if there was an easier way... I basically had 6 Commands to do the same basic thing. The second one didn't work, but the with Range did work.