Upload completed no error but firmware not updated - Mega 2560

Hi there,
I am trying to update the code on a Mega 2560. The code compiles and upload, I get the message 'avrdude done. Thank you.' However when I start MEGA, I can see that I am still on the old code.

Any clues someone?
Thank you

Explain more about your new code and old code what is the difference between them , also post them here

Your "new" code has a bug and actually behaves the same as your old code. The upload process verifies that the new code was uploaded. So if there are no errors, the problem was not in the upload. We frequently get people asking questions like this, and always eventually they come to the same conclusion.

It could well be as DrAzzy says but I'd report something which happened to me: I saw the 'avrdude done' message but with only a small window at the bottom, the error messages had scrolled out of sight, so it meant it had completed its job satisfactorily, having reported errors with your code.

If there were errors, it wouldn't complete its job. You can always resize the console pane of the IDE and scroll up to see what it was.

Under File:Preferences, turn on Verbose outputs as well to see what failed.