excel vba - How to get the following code to continue on error? -
if checkcontractstart(morememoryblock(i)) <> "" cells(rowcount + i, 3).value = format(datevalue(checkcontractstart(morememoryblock(i))), "dd mmm yyyy") else cells(rowcount + i, 3).value = "missing" end if for above expression,
i run format() when not empty. however, realized content may not empty contents non-formatable content such "comments" or maybe typos of date such missing /. so, wondering if there way code continue on error , return msgbox instead of stopping altogether?
wrap code on error resume next ... on error goto 0
on error resume next if checkcontractstart(morememoryblock(i)) <> "" cells(rowcount + i, 3).value = format(datevalue(checkcontractstart(morememoryblock(i))), "dd mmm yyyy") else cells(rowcount + i, 3).value = "missing" end if on error goto 0
Comments
Post a Comment