G
Guest
I want to Run a Dos Batch File from Microsoft Access Form Command Button.
I tried the following code, but failed :
Function RunBatch()
Dim GetFile As String
GetFile = Me!Text2
'In the text2 field of the form, I will write the complete batch file path
RunBatch = call Shell(Environ$("COMSPEC") & "/C GetFile", vbNormalFocus)
End Function
I called that Function on Command Button and it fails, does not work, gives
error.
Please advise, what will be writing Code.
I tried the following code, but failed :
Function RunBatch()
Dim GetFile As String
GetFile = Me!Text2
'In the text2 field of the form, I will write the complete batch file path
RunBatch = call Shell(Environ$("COMSPEC") & "/C GetFile", vbNormalFocus)
End Function
I called that Function on Command Button and it fails, does not work, gives
error.
Please advise, what will be writing Code.