Click button or execute JavaScript function with VBA

Try this:

Dim CurrentWindow As HTMLWindowProxy: Set CurrentWindow = ie.Document.parentWindow
Call CurrentWindow.execScript("exportData(workOrderSearchForm)")

But first you will need to include Microsoft HTML Object Library under References (Tools>References)

Leave a Comment