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:

  1. Write the value to a configuration file and let your MapBasic application read the value on startup

  2. 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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.