c and VB

harish13's Avatar
Go4Expert Member
hi,

have a exe file (developed in C) I want to call this exe from VB at the same time i want to pass a file name as parameter to that exe file .Please help me in this regard thank u in advance
pradeep's Avatar, Join Date: Apr 2005
Team Leader
This can be done with VB's shell command. See the example below.

Code: VB
Dim str, str1 As String
  str = Chr(34) & "c:\Program Files\Microsoft Office\office\Winword.exe" & Chr(34)
  str1 = Chr(34) & "D:\tyty.doc" & Chr(34)
  Dim id As Double
  MsgBox str
  MsgBox str1
   Shell str & " " & str1, vbNormalFocus