try removing the line "on error resume next" and "if err.number="" exit sub end if" to see if any errors come up
then debug from there, hope this helps