1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    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