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

Need help with shell

Status
Not open for further replies.

jav0

MIS
Nov 1, 2001
8
US
I have been unsucessful in making this work.. I have to be really close.. Please tell me where I've messed up..

Thanks..

Private Sub Command1_Click()
Dim srvname As String
srvname = txtServer.Text
Shell "c:\winnt\system32\ping" & srvname & "
>c:\temp\testping10.txt"
End Sub

Thanks again for your help
 
I believe that Shell() requires a return variable like this

Dim iReturnValue As String
iReturnValue = Shell("c:\winnt\system32\ping " & srvname & " >c:\temp\testping10.txt")

I also added spaces in your commands...
Nate Gagne
ngagne@numa-inc.com

Like my post? Let me know it was helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top