Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   c and VB (http://www.go4expert.com/forums/c-and-vb-t1949/)

harish13 20Nov2006 15:21

c and VB

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 20Nov2006 15:27

Re: c and VB
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

All times are GMT +5.5. The time now is 19:08.