Search code examples
excelsikulivba

Run Sikuli from button in Excel


I am new to VBA. In Excel sheet I have data. At the end of the every row I have an onclick button.

My requirement is when I click on a button it has to run Sikuli from command prompt.

Which command is used to open and run the command prompt in VBA?


Solution

  • I don't know sikuli, but if you want to run a command line from VBA code as part of a button click, look at the Shell command.

    Private Sub CommandButton1_Click()
      dblRetVal = Shell("java -jar %SIKULI_HOME%\script.jar path\yourScript.sikuli", vbHide)
      'VBHIDE HIDES SHELL WINDOW (BLACK DOS WINDOW)
    End Sub