Question

Situation: I am working to populate text entry boxes in a webpage with data from Excel. When the data is entered manually and the focus is moved to another text box, the 'onblur' event is fired to do input validation.

Desire: I want to be able to cause the 'onblur' event to be fired when I populate the same text boxes from VBA code in Excel.

Question: How do I cause the 'onblur' event to be executed?

Was it helpful?

Solution

I'm assuming you have access to the DOM, in which case you should be able to use

document.getElementById(*element*).fireEvent("onblur");

OTHER TIPS

Unless I have misunderstood your question, you want to know the VBA equivlant of OnBlur. That event is MyTextBox_Exit in VBA.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top