R
Rich
I have a block of code that deletes a form after I close it
ThisWorkbook.VBProject.VBComponents.Remove _
ThisWorkbook.VBProject.VBComponents("FormNameHere")
I run this code before some code that rebuilds the form with new data.
The problem happens when the user aborts the macro in between the
form being delted and being recreated. If that happens the next time
I run the macro there is no form to delete and it fails.
How can I wrap this code so that it checks to see if this form exsists
first?
Rich
ThisWorkbook.VBProject.VBComponents.Remove _
ThisWorkbook.VBProject.VBComponents("FormNameHere")
I run this code before some code that rebuilds the form with new data.
The problem happens when the user aborts the macro in between the
form being delted and being recreated. If that happens the next time
I run the macro there is no form to delete and it fails.
How can I wrap this code so that it checks to see if this form exsists
first?
Rich