Skip Run macro if module has been deleted

A

Arran

Hi to all,

I have a problem, I have a workbook that has a macro in it that has the
following code:
Else
Run "saveme"
Cancel = True
End If
This works fine but I have another macro that deletes the module that the
"saveme" macro is in.

Is there a way for the above code to be skipped if the module has been
deleted?

Thanks in advance.
 
S

slarbie

Since trying to run a routine that doesn't exist will trigger an error, why
not just use error handling? i.e.:

On Error Resume Next
Run "SaveMe"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top