c and VB

Discussion in 'Visual Basic ( VB )' started by harish13, Nov 20, 2006.

  1. harish13

    harish13 New Member

    Joined:
    Jul 20, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    This can be done with VB's shell command. See the example below.

    Code:
     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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice