B
Brad
This should be simple. I am trying to initiate a little program called
“Fired.exe†from an Access VBA routine.
I can initiate the program with no passed parameter just fine.
I can initiate the program and pass it a parameter that is “hard coded†in
the Shell statement.
Now I am simply trying to initiate the program and pass it a parameter that
is contained in a variable. I am pulling my hair out as I have done quite a
bit of digging and experimenting with no success.
Here is the gist of my code…
‘~~~~~~~~~~~~~~~~~~~~
Dim my_parm As String
my_parm = "NO"
' This works (no parm is passed)
Shell "C:\Fired.exe"
' This works (Hard-coded "YES" is passed to Called Program)
Shell "C:\Fired.exe YES"
' Now I want to pass a parm that is a variable – I cannot figure out how to
make this work.
Shell ("C:\Fired.exe my_parm") ???
Shell ("C:\Fired.exe & my_parm") ???
‘~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks for your help with this,
Brad
“Fired.exe†from an Access VBA routine.
I can initiate the program with no passed parameter just fine.
I can initiate the program and pass it a parameter that is “hard coded†in
the Shell statement.
Now I am simply trying to initiate the program and pass it a parameter that
is contained in a variable. I am pulling my hair out as I have done quite a
bit of digging and experimenting with no success.
Here is the gist of my code…
‘~~~~~~~~~~~~~~~~~~~~
Dim my_parm As String
my_parm = "NO"
' This works (no parm is passed)
Shell "C:\Fired.exe"
' This works (Hard-coded "YES" is passed to Called Program)
Shell "C:\Fired.exe YES"
' Now I want to pass a parm that is a variable – I cannot figure out how to
make this work.
Shell ("C:\Fired.exe my_parm") ???
Shell ("C:\Fired.exe & my_parm") ???
‘~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks for your help with this,
Brad