After starting the automatic mode, I cant switch it off.

ieee488:
You do realize that loop( ) runs continuously?

Adjust your code to fit that scenario.

Makes sense i guess, so i should make an other void for the automatic program?

boolrules:
These "if"s should not be nested:

 if(val == val2) {                     // make sure we got 2 consistant readings!

if (val != modeButtonState) {        // the button state has changed!
      if (val == LOW) {                  // check if the button is pressed
        if (Mode == 0) {
          Mode = 1;
        } else {
          if (Mode == 1) {
            Mode = 0;
          }

What is the problem with that? It does work.