ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   code to fill in missing border lines (https://www.excelbanter.com/excel-discussion-misc-queries/53541-code-fill-missing-border-lines.html)

Jack Sons

code to fill in missing border lines
 
Hi all,

In some rows (I can't predict which ones) between rownumber 2 an 120 the
cells in the ranges A : N have a thick lower border (Borders(xlEdgeBottom)
and Weight = xlThick).

In some cases there can occur a gap (in columns F and M only).

What is the most efficient code to "repair" these gaps?

TIA

Jack Sons
The Netherlands



Dave O

code to fill in missing border lines
 
Do you really need code for this? Seems like it would be easier to
highlight that range and apply thick borders.


Jack Sons

code to fill in missing border lines
 
Dave,

Sure, but othe people will open it (it is made by code anew every time it is
opened) and it is not nice to present a spreadsheet with the gaps I
mentioned.

Jack.

"Dave O" schreef in bericht
oups.com...
Do you really need code for this? Seems like it would be easier to
highlight that range and apply thick borders.




Dave O

code to fill in missing border lines
 
Here's an idea: you might record the macro that will apply borders, and
then add that specific code at the bottom of the macro that runs every
time the file opens. The additional lines of code would look something
like this:

Range("A2:N120").Select
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThick
End With
Range("A1").Select



All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com