View Single Post
 
Old 12-11-2012, 09:34 AM
CatMan CatMan is offline Windows 7 32bit Office 2010 32bit
Intermediate
 
Join Date: Apr 2012
Posts: 39
CatMan is on a distinguished road
Default Close 'downloads' window with VBA

Hi forum, thanks to all for taking the time to read this.

I need to closed the File Explorer (FE) 'downloads' window and an Internet Explorer (IE) window using VBA. I am using windows 7. The downloads folder is generally located here: "C:\Users\User\Downloads". I can open it like this, but how do you close it? I also need to close an IE window. Both the FE an IE windows open as a result a process that is VBA launched using ShellExicute, which does not support any hand shaking between the VBA process and the ShellExicute process because ShellExicute does not support variable passing, unless someone knows better. Closing all FE windows would suffice but hopefully there is a way to close the downloads folder FE.

Code to open downloads folder:
Code:
 
Shell "explorer C:\Users\User\Downloads"

Last edited by CatMan; 12-12-2012 at 10:20 AM.
Reply With Quote