Sorry if my assumption that that your name isn't correct.
What doesn't work? Do you get an error message? If you step through the code
what happens? If you comment out the on error statement do you get an error?
I suspect that some of the objects coded for are not availiable to VBA or
are not referenced.