Click button or execute JavaScript function with VBA

前端 未结 3 1909
青春惊慌失措
青春惊慌失措 2020-11-30 14:26

I\'m trying to get my VBA routine to interact with a page that uses JavaScript, and have been successful in the past. After a recent update, it no longer works. At this po

3条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 15:00

    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)

提交回复
热议问题