If you step through your code, what is your lastRow variable returning? Put your cursor in your routine, press F8 four times, then hover your mouse over lastRow, what does it say?