How make Module remember closed status in VBE?

D

Dan Williams

How can I get a workbook to reliably save the Open or Closed status of
its VBA Modules in the VBE? I use Ctrl+F6 to cycle among the Modules
I'm editing, and I want some of them to not keep popping up.

I've had some success making a token edit, closing the unwanted Module,
and then saving the Workbook. In most cases, the Module is still
closed the next time I open the Workbook and open the VBE. But in some
cases this doesn't work, and there's the open Module again each time I
open the Workbook.

(Actually, in the instance that's annoying me right now, it's the
"ThisWorkbook" object.)

Excel 2000, Windows 2000

Dan Williams
danwPlanet
 
D

Dan Williams

Whoops, I may have figured it out. When I save, the cursor apparently
has to be in the Module window, whereas sometimes I had it in the
Project Explorer window (because I had also wanted to collapse the
Module there).

A secondary question is, how can I save the collapsed status. The same
rules seem to apply. I have to have the cursor in the Project Explorer
window to save that status, and I have to have edited the Project
Explorer list, e.g., inserting a dummy module. Sheesh. A cleaner way
would be nice if you know of one.

Dan Williams
 
D

Dave Peterson

If you protect the project with a simple password, it won't be expanded (until
you want).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top