I would first create a dos batch file, maybe call it GetDir.bat
and then run this from shell command as sgown
Shell "c:\GetDir.bat", vbHide
*********GetDir.bat**********
@echo off
dir
*****************************
Hope this helps
Saleem
-----Original Message-----
From: Peter Conrey [mailto:pconrey@t...]
Sent: Wednesday, February 28, 2001 2:16 PM
To: professional vb
Subject: [pro_vb] RE: VB6 SHELL command
I apologize if I mislead you, but shell will only work to launch an .exe
from the command line (or similar task). The value returned from the Shell
function is the Process ID of the application launched (or 0 if it fails).
-----Original Message-----
From: bill salkin [mailto:wsalkin@h...]
Sent: Wednesday, February 28, 2001 1:05 PM
To: professional vb
Subject: [pro_vb] VB6 SHELL command
1. When I run SHELL (under VB 6) as folows:
RetVal = Shell ("dir c:\")
I get a file-not-found error. How do I issue intrinsic DOS commands?
2. I want to SHELL to a custom math routine. I want SHELL to return a
value but NOT to open a DOS window. How can I do this with SHELL?
TIA,
Bill