How to Close visual basic window

  • Thread starter Thread starter Guest
  • Start date Start date
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..
 
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.)
 
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.)
 
Back
Top