Object was unloaded (Error 364)

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

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.