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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping the VBE invisible when programmatically insterting code

Status
Not open for further replies.

aliendan

Programmer
Jun 28, 2000
79
US
I have a form that when you click a command button it creates a form behind the scenes and inserts code into the form module for objects that are created for the form. I can use the 'Application.Echo False' statement to keep the creation of the form from being seen by the user but it doesn't work for the insertion of the code into the module. What happens is, the VBE pops up and when the insertion of the code is finished the VBE minimizes to the Windows tray. I'm thinking this: The Application property works on anything that is actually an integral part of Access and since the VBE is really another program that works from within Access the Application property won't work for it. So....does anyone have an idea how I can keep the VBE from being seen while the code in inserted for the form and also make sure that it is closed when finished instead of being minimized?

Thanks in advance,
Dan
Dan Rogotzke
Dan_Rogotzke@oxy.com
 
I had exactly the same problem!

Try this:

application.mainwindow.visible = false

I inserted this at the end of the procedure that creates the 'on-the-fly' code!

I hope this helps!!!

Best Regards,

Anand Lakhani

e: anand.lakhani@pre-cog.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top