Try adding this line to your code

ActiveSheet.UsedRange
VBA Noob