Good Morning All,

I am having a major issue here; for some reason the line of code below works and sometimes does not work. When it desides not to work, it leaves a mess in my excel sheet.

Range("A1").Select ' This just goes to the upper left corner of the sheet
 
 Selection.End(xlDown).Select
' The line of code above is suppose to jump to the last empty row in column A1.

Please can someone tell me what the problem is? Or is there another code I can use to achieve the same goal?

Ini

try doing a msgbox on your xlDown variable, and make sure it has the right value... what happens to the sheet when it messes up?

What happens is that sometimes when I use the code for it to jump to the last blank row, it would jump and that's fine. But on some cases it would not jump instead it would select A1 as the last row and would start over writing my data's in A3, A4 and so on.

Hmn, can you post the entire project?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.