Closing an Open Window

TimE

Registered User.
Local time
Today, 00:42
Joined
May 17, 2005
Messages
55
I use the following to open a window in Windows XP. How can I close it through VB?

Code:
Dim oShell
Set oShell = CreateObject("Wscript.Shell")
oShell.Run "explorer c:\winnt\fonts"
 
What are you wanting to close from VBA? Are you opening something in Access (this is an Access forum so that's why I phrased it that way) and then wanting to close it?
 
Ok, there may be a better way to do this. When the StartUp form is opened, I have it check to see if 2 fonts are present on the local machine. If not, the database closes and the then copies the fonts to the c:\winnt\fonts folder. I then have the folder open to complete the installation of the fonts. I would like the Explorer window "Winnt\Fonts" to close afterwards.
 

Users who are viewing this thread

Back
Top Bottom