code to fill in missing border lines

  • Thread starter Thread starter Jack Sons
  • Start date Start date
J

Jack Sons

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
 
Do you really need code for this? Seems like it would be easier to
highlight that range and apply thick borders.
 
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.
 
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
 
Back
Top