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

Maixmising Help!!!!!

Status
Not open for further replies.

mannion

IS-IT--Management
Jun 24, 2002
73
GB
Hi

I have this script in my program:

[colour red]
Shell ("c:\winnt\explorer.exe \\server\") & Text1.Text
[/color]

Everytime I run it, it runs minimised. What should I do to make it run Normal or maximised?????

Thanks!! James Mannion
IT Officer
mannion@whitecross.hereford.sch.uk
 
The second parameter to the Shell function is the window state, and the default is minimized. Since you are not specifying that parameters, it is assuming the default.

You might want to try the following:

Shell ("c:\winnt\explorer.exe \\server\" & Text1.Text, vbNormalFocus) Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Right I tried your suggestion and I now get a compile error saying "expected ="

Any more Idea's

Cheers for the last suggestion, moved one step closer at least!!! James Mannion
IT Officer
mannion@whitecross.hereford.sch.uk
 
Either assign a return value, or remove the parenthesis

RetVal = Shell ("c:\winnt\explorer.exe \\server\" & Text1.Text, vbNormalFocus)

or

Shell "c:\winnt\explorer.exe \\server\" & Text1.Text, vbNormalFocus Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks this worked a treat:

Shell "c:\winnt\explorer.exe \\server\" & Text1.Text, vbNormalFocus

Thanks once again!!! James Mannion
IT Officer
mannion@whitecross.hereford.sch.uk
 
You might not be using the code correctly

a function returns a value and you must assign it to a variable when using parenthesis

'EXAMPLE
x = Shell("c:\winnt\explorer.exe c:\", vbNormalFocus)

if you call a function without parenthesis you can not retrieve the return value

'EXAMPLE
Shell "c:\winnt\explorer.exe c:\", vbNormalFocus"

let me know if this works for ya

Tim Putzer
tjputzer@yahoo.com
 
Thanks everyone for your help Case solved

Cheers :) James Mannion
IT Officer
mannion@whitecross.hereford.sch.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top