A
AltaEgo
Hi all
W7
XL2007
(same problem on XP. 2003)
Cannot use Cscript or Wscript.
I need to send some commands to a command window. Tested this code (and
variations). The Cmd window receives no keystrokes but the Msgbox pops up.
Sub test()
Dim ReturnValue
ReturnValue = Shell("CMD.EXE", 5)
'AppActivate ReturnValue
'will err when uncommented
SendKeys "ipconfig /all {ENTER}", True
MsgBox "done"
End Sub
W7
XL2007
(same problem on XP. 2003)
Cannot use Cscript or Wscript.
I need to send some commands to a command window. Tested this code (and
variations). The Cmd window receives no keystrokes but the Msgbox pops up.
Sub test()
Dim ReturnValue
ReturnValue = Shell("CMD.EXE", 5)
'AppActivate ReturnValue
'will err when uncommented
SendKeys "ipconfig /all {ENTER}", True
MsgBox "done"
End Sub