Hi elevisse,

You need to learn the "On Error GoTo" statement. See http://www.cpearson.com/excel/ErrorHandling.htm