问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/13192888/run-sikuli-from-button-in-excel