View Single Post
 
Old 09-19-2018, 12:35 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Excel doesn't automatically reset the used range until the workbook is saved.

This is untested but you might get a reset on the fly with one of these two instructions right ahead of putting in the boarders and fonts.
Code:
    ActiveSheet.UsedRange
    X = ActiveSheet.UsedRange.Rows.Count
'Put borders around new rows.
Reply With Quote