how would i get vb to do a shell command then save the results into a text file? im sorry if this isnt in the right forum. thx for any help :D
Printable View
how would i get vb to do a shell command then save the results into a text file? im sorry if this isnt in the right forum. thx for any help :D
well,
VB Code:
Dim retval As Long Dim FileNum As Integer FileNum = FreeFile retval = Shell("Notepad") Open App.Path & "\MyText.txt" For Append As #FileNum Print #FileNum, retval Close #FileNum
This writes the return value of the shell command to a textfile.
Is this what you want?