SyntaxFix
Write A Post
Hire A Developer
Questions
You should use the .End(xlup) but instead of using 65536 you might want to use:
.End(xlup)
sheetvar.Rows.Count
That way it works for Excel 2007 which I believe has more than 65536 rows