I'm begginer in VB. i want to develop a VB application in which there's a need of opening a .exe file when a button is pressed.

Please tell me how to link a button to a .exe file so that it will be opened when the button is pressed.


use the shell command. You need to know the path to the EXE, and you simply, double click the button (to get to the onclick event):

shell "c:\windows\notepad.exe", vbnormalfocus

so, you type shell, then the path and name of the .exe to launch. The part after the comma, denotes how you want the window to be displayed during the launch. In this case, we want it to show the window to the user, so they can play with it or whatever. You can set it to vbhide so that exe will run, but it will never display the window (usefully for shelling DOS apps, that only server a quick purpose to your APP). Anyway, I hope this helps.