VBE Code Modules will not stay closed

  • Thread starter Thread starter Tony_VBACoder
  • Start date Start date
T

Tony_VBACoder

In Access 2002 (SP2) with WinXP, why won't my code modules
stay closed when I close Access? If I open up code behind
forms or Modules and close each window, the next time I
open Access and go into my VBE and select "Window", I have
all my module windows open again.

Is there some new setting for this? I have never noticed
this strange behavior with previous versions of Access.
 
Tony_VBACoder said:
In Access 2002 (SP2) with WinXP, why won't my code modules
stay closed when I close Access? If I open up code behind
forms or Modules and close each window, the next time I
open Access and go into my VBE and select "Window", I have
all my module windows open again.

Is there some new setting for this? I have never noticed
this strange behavior with previous versions of Access.

Not only is it an annoyance, it can even cause Access to fail due to
insufficient resources to display all those windows. Here's what works
for me to fix it.

Open up the VB Editor. Make an unimportant change to any module, like
adding a space at the end of a line. Then change it back if you have
to. The sole purpose of this change is to convince the editor that your
VB project is "dirty". Now compile your project. After doing that, and
before you save the project, close all the open module windows. *After*
you've closed all the module windows, click the Save button on the
toolbar, or the menu item File -> Save (project name), or press Ctrl+S.

The next time you open the VB Editor, the windows should still be
closed. In the future, as you work in the VB Editor, close the module
windows before saving the project.
 
Dirk

Thanks for the help...it worked as planned. I can't
believe this hasn't been fixed with a Patch, or has it?
 
Tony_VBACoder said:
Dirk

Thanks for the help...it worked as planned. I can't
believe this hasn't been fixed with a Patch, or has it?

The fact that the VB Editor is designed to save the environment in the
form in which you last saved it, open windows and all, isn't exactly a
bug, so I doubt it will be fixed. The fact that this can lead to such a
drain on resources that you can find yourself unable to open the Editor
at all *is* a bug, but I don't think it has been fixed by any patch. I
don't know whether it's still a problem in Access 2003 or not.
 
Back
Top