Closing a Module

J

JimB

How do I close a module (using code) that I opened using the Docmd.OpenModule
Method? There doesn't seem to be any corresponding close method. (Access
2000). When I open the module, it flashes onto the screen and then stays
open. Also, how to you keep from switching to the Visual Basic Window when
this happens?

JimB
 
M

Marshall Barton

JimB said:
How do I close a module (using code) that I opened using the Docmd.OpenModule
Method? There doesn't seem to be any corresponding close method. (Access
2000). When I open the module, it flashes onto the screen and then stays
open. Also, how to you keep from switching to the Visual Basic Window when
this happens?


Use DoCmd.Close acModule, modulename

I don't think there's a way to prevent the focus from
shifting to the module when you open it.

But, this is a pretty unusual thing to do. You are not
performing design time operations at runtime are you? If
you are, you should seriously reconsider your plan and find
another way to accomplish what ever you're trying to do.
 
J

JimB

I'm using the properties og the module for documentation functions (like
CountofDeclarationLines and ProcofLine) Is there a way do access these
properties without opening the module?

JimB
 
M

Marshall Barton

No there is not.
--
Marsh
MVP [MS Access]

I'm using the properties og the module for documentation functions (like
CountofDeclarationLines and ProcofLine) Is there a way do access these
properties without opening the module?
 

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