Option Explicit Public FilesToAdd As Integer Private Sub TEST_Click() FilesToAdd = 1 Dim b As Variant Dim Prog As String Dim File As String Prog = "C:\Program Files\Mapinfo\Professional\Mapinfow.exe" File = "C:\Mapinfo\Combine\SelectCarrier.MBX" b = Shell(Path + " " + File, vbNormalFocus) End Sub
Unfortunately you can't add extra parameters to your command line and then have your application reading these.
I can think of two options:
Write the value to a configuration file and let your MapBasic application read the value on startup
Transfer the value to the application using DDE. Have a look at the chapter "Inter-Application Communication Using DDE" in the MapBasic User Guide (page 199)