How do I run an executable program from VB. I have the
following code:
Set Sumfin = New VBA
Sumfin.Interaction.Shell "C:\Command.exe"
Use the following API function.
Private Declare Function ShellExecute Lib "shell32.dll"
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal
lpOperation As String, ByVal lpFile As String, ByVal
lpParameters As String, ByVal lpDirectory As String, ByVal
nShowCmd As Long) As Long
Refer to the documentation, on using the above API
function, given in the below link.
http://msdn.microsoft.com/archive/default.asp?
url=/archive/en-us/dnarvb4/html/msdn_shelexec.asp
>-----Original Message-----
>How do I run an executable program from VB. I have the
[quoted text clipped - 3 lines]
>Sumfin.Interaction.Shell "C:\Command.exe"
>.
Nigel - 25 Nov 2003 11:36 GMT
Thank you
>-----Original Message-----
>Use the following API function.
[quoted text clipped - 20 lines]
>>
>.
Why don't you just use the built-in VB shell command?
Try:
Shell "cmd"
----------------------------------------------------------------
> How do I run an executable program from VB. I have the
> following code:
>
> Set Sumfin = New VBA
> Sumfin.Interaction.Shell "C:\Command.exe"