This is a guess since you didn't say what error occurred.
xl2007 can open older versions of files in compatibility mode -- where the
number of rows is 64k (not 1 meg).
So depending on what workbook/worksheet is active, that unqualified Rows.count
could be 64k or 1Meg.
I'd qualify that range:
with Master_Wksht
lastrow = .range("N" & .rows.count).end(xlup).row
end with
Simon wrote:
Hi there, I hope you can help, I am not VB literate unfortunately but I am
trying to run a macro with the following line of code which creates an error:
LastRow = Master_Wksht.Range("N" & Rows.Count).End(xlup).Row
Is there a change between versions which means this line won't work any more?
--
Dave Peterson