I can run this command on its own all day long, and it works without flaw:
But when I try to run it via a VBA Shell command, I get nothing:
[CODE VBA]Shell("net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34))[/CODE]
I also tried adding retVal into this just adding to the same line:
[CODE VBA]retVal = Shell("net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34))[/CODE]
And that does not work. Though I would think the latter isn't really what I'm after.
Also tried:
[CODE VBA]Call Shell("net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34))[/CODE]
Also tried:
[CODE VBA]Shell "net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34)[/CODE]
It all runs with no errors, but I get no file?
What am I missing? What am I forgetting?
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
Code:
net view>"C:\temp\netview.txt"
But when I try to run it via a VBA Shell command, I get nothing:
[CODE VBA]Shell("net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34))[/CODE]
I also tried adding retVal into this just adding to the same line:
[CODE VBA]retVal = Shell("net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34))[/CODE]
And that does not work. Though I would think the latter isn't really what I'm after.
Also tried:
[CODE VBA]Call Shell("net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34))[/CODE]
Also tried:
[CODE VBA]Shell "net view>" & Chr(34) & "C:\temp\netview.txt" & Chr(34)[/CODE]
It all runs with no errors, but I get no file?
What am I missing? What am I forgetting?
"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57