Hello All,
What's the correct way to use On Error Resume Next? What I'm trying to achieve is when the macro returns any error, it will show a message box. Sorry, I'm starting to learn VBA scripts recently on my own as much as possible, but I'm confused what's the correct way here.
The message box line that i would like to incorporate is:
MsgBox("Duplicate Name found", vbOKOnly, "File Finder")
The Macro: What it does is generate a worksheet and name it based on a reference sheet. But if a worksheet name already exists and you try to generate it again, it will return an error. What I would like to get is instead of an error, the msgbox will appear instead.
I'm trying to play with different placements of On error resume next to see if it will bypass the error, but no joy...
Bookmarks