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

Maximize Windows Explorer Window

Status
Not open for further replies.

AlienDan12

Programmer
Feb 10, 2002
4
US
I'm using this code to open Windows Explorer:

Dim Shell

Set Shell = WScript.CreateObject("Shell.Application")

Shell.Explore "C:\"

Set Shell = Nothing
WScript.Quit

What do I need to add to it to maximize the window?

Can anyone help me with this?

Thanks!
 
This piece of code can solve your problem:

Dim WshShell
Set WshShell=Wscript.CreateObject("wscript.Shell")
'The "3" parameter in the following line opens it maximised
WshShell.Run "explorer.exe /e,c:\",3,TRUE
WshShell=Nothing
Wscript.Quit
 
I finally had time to get back to you. Thank you, it works. I didn't know about the "3" and after experimenting I understand the "3". :) Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top