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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -