[dba-VB] VB6 Shell

bkollodge at parkindustries.com bkollodge at parkindustries.com
Tue Nov 16 16:11:09 CST 2004


That did it!  Thanks so much!


Bill


-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Eric Barro
Sent: 16 November 2004 4:01
To: dba-vb at databaseadvisors.com
Subject: RE: [dba-VB] VB6 Shell


Insert this in your code...

Dim winPath as string

winPath = Environ$("SystemRoot")

and then change your shell line to read...

   RetVal = Shell(winPath & "\explorer.exe", vbMaximizedFocus)

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com]On Behalf Of
bkollodge at parkindustries.com
Sent: Tuesday, November 16, 2004 1:43 PM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB6 Shell


Do any VB6 programmers know how to use the shell to run a systems app
such as explorer?  The "target" was copied from my desktop shortcut but
doesn't work - I must be missing some syntax???

Private Sub Command1_Click()
   RetVal = Shell("%SystemRoot%\explorer.exe", vbMaximizedFocus) End Sub

Thanks,
Bill Kollodge
Electrical Engineering / CNC Products
Park Industries
St. Cloud, MN  56303
bkollodge at parkindustries.com

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com








----------------------------------------------------------------
The information contained in this e-mail message and any file, document,
previous e-mail message and/or attachment transmitted herewith is
confidential and may be legally privileged. It is intended solely for
the private use of the addressee and must not be disclosed to or used by
anyone other than the addressee. If you receive this transmission by
error, please immediately notify the sender by reply e-mail and destroy
the original transmission and its attachments without reading or saving
it in any manner.  If you are not the intended recipient, or a person
responsible for delivering it to the intended recipient, you are hereby
notified that any disclosure, copying, distribution or use of any of the
information contained in or attached to this transmission is STRICTLY
PROHIBITED. E-mail transmission cannot be guaranteed to be secure or
error free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of email transmission.
Users and employees of the e-mail system are expressly required not to
make defamatory statements and not to infringe or authorize any
infringement of copyright or any other legal right by email
communications. Any such communication is contrary to company policy.
The company will not accept any liability in respect of such
communication.


_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list