BlackieHamel
Board Regular
- Joined
- May 9, 2014
- Messages
- 93
I am able to run a Shell command to run a batch file from within a VBA macro, but I'm failing when I attempt to add a command-line argument. Can you tell me what is wrong with this?
Thanks.
Blackie
Code:
Sub MassageData()
Dim PathCrnt As String
Dim sString As String
sString = InputBox("Enter Search String")
PathCrnt = ActiveWorkbook.Path
Call Shell(PathCrnt & "\TCwithvar.bat" & sString & PathCrnt)
MsgBox ("Results copied to Clipboard!")
End Sub
Thanks.
Blackie