Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete all modules in the form with code 1

Status
Not open for further replies.

primerov

Technical User
Aug 16, 2002
160
0
0
BG
Is it possible to delete all the modules in a form ? For example from the click event of one form to delete
all the modules in another form.
 
I don't quite get your question. Each form can have only one module, but the module can contain multiple routines.

To delete a form's module, just set the HasModule property on the form to False. This will delete any code in there, however. You can certainly do this on one form to remove the code from another. eg

Forms("Form2).Properties("HasModule") = False

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top