It doesn't give an error because you are specifically telling it to ignore all errors, that's what
On Error
does - when an error occurs, you transfer control directly to the the label and exit the function, effectively ignoring the error.
And BTW:
Quote:
i see there is no wrong with my code
A lack of Compiler errors does not mean your code works. All that means is that you have written it in the right language (think of an email - you wrote it in English words, not German) not that it does what you wanted it to (that email - does it invite your friends to a party, or tell them to go jump off a cliff? Both are English, so they "compile" but only one of them will work).
Remove your
On Error
or handle the error so you can report / log it, and use the debugger to find out exactly what is happening when you code runs.