How to Close visual basic window

G

Guest

Hi to all,
In my form module, I call a user defined function in a standard module and
use createform() and createEventProc() in that function. Upon completion of
this Function, Visual Basic window stay open. How can I close that window?
I've tried DoCmd.close, DoCmd.close acModule without any success. Any help
is appreciated. Thanks in advance..
 
6

'69 Camaro

Hi, Harry.

To close the VB Editor window after the rest of your code runs, try:

Application.VBE.MainWindow.Visible = False

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
6

'69 Camaro

Hi, Harry.

Oops. I forgot to mention that you'll need to add the Microsoft Visual
Basic for Application Extensibility 5.3 library to your References, if you
haven't already.

In the VB Editor, select the Tools menu -> References to open the References
dialog window. Scroll down to the Microsoft Visual Basic for Application
Extensibility 5.3 library and select it. Select the "OK" button to save
your change, then compile the code by selecting the Debug menu -> Compile
<DatabaseName>.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
G

Guest

Thank you! Just what I am looking for.

'69 Camaro said:
Hi, Harry.

To close the VB Editor window after the rest of your code runs, try:

Application.VBE.MainWindow.Visible = False

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 

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