Object was unloaded (Error 364)

A form was unloaded from its own _Load procedure. This error has the following cause and solution:

  • A form with an Unload statement in its _Load procedure was implicitly loaded. For example, the following will implicitly load YourForm if it isn't already loaded:

      MyForm.BackColor = YourForm.BackColor. 
    

    Remove the Unload statement from the Form_Load procedure.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.