Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic Window 1

Status
Not open for further replies.

hickeyc

Technical User
Sep 12, 2001
12
US
I have some VBA code that opens a module and then later closes it. The module closes but the Visual Basic Window remains open. Is there any way to close this window using VBA code?
 
dear hickeyc,

Couldn't you let the module close the window?

regards Astrid
 
I'm closing the module using this command:

DoCmd.Close acModule, "Name Public Variables", acSaveYes

It closes this module but leaves the VBA window open. Is there another way to close the module?
 
dear hickeyc,

what about this?

Application.VBE.MainWindow.Close

Give it a try and tell me

regards
Astrid
 
That gives me a system error, closes the access database, still leaves the VBA window open.

I also tried using activewindow in place of mainwindow with the same results.

Thank you for the suggestion. I appreciate your time and help on this.
 
try
Application.VBE.MainWindow.Visible = False

ide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top