Thread: Borders
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Borders

If all the columns are the same length as Column A then

Sub brdrArnd()
lr = Cells(Rows.Count, 1).End(xlUp).Row
ActiveSheet.Range("A1:S" & lr).BorderAround Weight:=xlMedium
End Sub

However, If you save the file with the border, then when you run the
macro again, if the column length has changed, you will have another
frame for each change in length. You will have to remove the border
before saving to prevent this anomaly.


"Scott J" wrote:

Hi everyone,

I was wondering if anyone can help me with some code to dynamically place a
border on the last row of a spreadsheet. The issue for me is that the
spreadsheet varies in length (based on filtering), but the columns are static
(A:S). What I was hoping to do is place a border on the last row so the
spreadsheet will be completly framed out once printed.

Does anyone have any ideas?

Thanks,

SJ