473,466 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is there any way to close the Visual Basic (VB) Editor using VBA coding?

gnawoncents
214 New Member
Greetings,

I have a database which uses VBA to dynamically create a report and add VB coding to the on close and on open events. All this works fine, however, when the report closes, the Visual Basic Editor remains open (it opened when the event coding was added). Is there any way to tell the VB Editor to close using coding?

I have tried programmatically closing and reopening the report, but the editor remains throughout. Any ideas?

Thanks for your help!
Oct 8 '10 #1

✓ answered by MMcCarthy

Try this it should close the window for you.

Expand|Select|Wrap|Line Numbers
  1. Application.VBE.MainWindow.Visible = False

3 7024
slenish
283 Contributor
Do you have any errors that are popping up? First thing that comes to mind is you might need to put in an error handler so it checks for an error and bypasses it so it does not kick open the VB editor.

Can you post a dummy example of your DB so we can see it?
Oct 8 '10 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Try this it should close the window for you.

Expand|Select|Wrap|Line Numbers
  1. Application.VBE.MainWindow.Visible = False
Oct 8 '10 #3
gnawoncents
214 New Member
That did it. Thanks!
Oct 9 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ian Smith | last post by:
I have VB.net 2002 and am trying to open the samples from 101 Visual Basic.Net Applications. They won't load, saying they were created by a more recent version of Visual Studio. Should these...
4
by: Corepaul | last post by:
I am a beginner, using Access 2000. I am having difficulty with the Visual Basic Help. Specifically, using the Index tab, when I enter "OpenRecordset" in the keyword field and click the Search...
5
by: veens-zevenhonderdvijf | last post by:
Hi, In the past year I've been working more and more with visual basic (VB) and less with turbo pascal (TP). There is however one thing I have not discovered how to do with VB that I could...
13
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format...
3
by: marknoten | last post by:
I'm quite a newbie to Visual Basic and have a problem with the Input # statement in the Visual Basic Editor from Excel. I would like to read in a tab delimeted text file selected by a user with...
11
DUNXALEARE
by: DUNXALEARE | last post by:
Hello everyone! I have a new assignment. I just dont know how to create a data report using ms excell. I need to search particular group of data/records using Visual basic 6. in MS Access and...
0
by: venkinath | last post by:
Hi, I need Visual Basic (VB 6) code to print a pdf file, i select. Please help. Thanks & Regards, Venkatesh.R
5
by: AjGrace | last post by:
Hi! Im a Beginner in SQL server and I need to know how to connect to it using Visual Basic 6.0 using Ado connection..Thanks In Advance guys!
6
by: ashokbio | last post by:
I want to create an associative array, similar to PERL language, using Visual Basic 6. Example: Using PERL %A = ("A"=>"Apple","B"=>"Banana"); i.e., A is associated to the word Apple and B...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.