Hi,
I am using the webbrowser control in a form. I would like to pass a javascript string to a VBA variable when I click on a button in the html file. Is there any way to do this?
I found the below code but it doesn't work. It also doesnt pass a javascript string to a VBA procedure:
thanks,
Tom
I am using the webbrowser control in a form. I would like to pass a javascript string to a VBA variable when I click on a button in the html file. Is there any way to do this?
I found the below code but it doesn't work. It also doesnt pass a javascript string to a VBA procedure:
Code:
//We could directly call a macro from JavaScript, please refer to following script:
<SCRIPT>
function CallVBA(MacroName)
{
var ExApp;
ExApp = new ActiveXObject("Excel.Application");
ExApp.Run(MacroName);
}
CallVBA("HelloExcel");
</SCRIPT>
thanks,
Tom