Run DOS Prompt

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there, I need to run a .exe file to run some exported data through a
programme before importing it back into Access.

Where/how can I run the .exe file from a query or macro to automate the
process (I'm fine with exporting and importing the files - just need to know
how to run the .exe).

Thanks
 
Create a function in a mudule that run the exe file

Function RunExe()
Dim PathAndName As String
PathAndName = "c:\ProgramName.exe"
Shell PathAndName
End Function
==================
You can reate a macro that run the function, or just run the function before
the import
 
Thanks, I have virtually no knowledge of VBA, only queries and macros. The
..exe file is: "C:\Program Files\HSCIC\HRG Grouper\whrg32.EXE".

Wonder if you could help me with the VBA for the module? Happy to provide
any more information needed.

(Just entering the .exe location into the VBA does not work).

Thanks
 
Open a module, copy this function into the module
===================================
Function RunExe()
Dim PathAndName As String
PathAndName = "C:\Program Files\HSCIC\HRG Grouper\whrg32.EXE"
Shell PathAndName
End Function
===================================
Create a macro, in the Action Section select
RunCode

On the buttom you have function Name, insert there
RunExe()
===================================
Now, try and run the macro
 
Back
Top