views:

257

answers:

2

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?

A: 

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

Oorang
Can you elaborate?
Jay
+3  A: 

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

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