Hi experts,
Could someone help to solve my question? Here I want to execute an Excel VBA macro, called execute_demo from Swi prolog DDE.
Without parameters, it runs well and return True.
But, I need to pass parameters into the macro. I tried many possible combination but fail, such as dde_execute(C,’[run(“execute_demo 1”)]’).
I don’t have any clues to do it. Can anyone help to shed light on it?
Thank you for your helps in advance.
Excel vba:
Public sub execute_demo( i as integer)
msgbox(i)
end sub
SWI prolog:
run_excel_macro() :-
open_dde_conversation('Excel','[swipl_excel.xlsm]S',C),
dde_execute(C,'[run("execute_demo")]'),
close_dde_conversation(C).