Inluded comments and a try catch error handler.
I disabled some of my previous code by commenting them to ensure that the catch part works.
I would not normally do it but found it handy for runtime errors as this was exactly that and only on running the app I found the problem and the solution with the nested if statement.
I would not put the messagebox in but have left it there for the purpose of this excersise.

Signed-off-by: 48323934 <48323934@mylife.unisa.ac.za>