Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Events 如何在vba中激活一个按钮,其中单击事件是唯一的标识符?_Events_Vba_Onclick_Html Parsing - Fatal编程技术网

Events 如何在vba中激活一个按钮,其中单击事件是唯一的标识符?

Events 如何在vba中激活一个按钮,其中单击事件是唯一的标识符?,events,vba,onclick,html-parsing,Events,Vba,Onclick,Html Parsing,嗨,我尝试过不同的方法,但没有成功。任何人都能想出如何激活此按钮上的事件: <b>Class="palette" Title="Tilf&oslash;j" onclick ="paletteAdd('databank_form_frekvens_dualListBox_choices', 'databank_form_frekvens_dualListBox_selection',

嗨,我尝试过不同的方法,但没有成功。任何人都能想出如何激活此按钮上的事件:

<b>Class="palette" Title="Tilf&oslash;j" 
  onclick ="paletteAdd('databank_form_frekvens_dualListBox_choices', 
                       'databank_form_frekvens_dualListBox_selection',
                       'databank_form_frekvens_dualListBox_recorder');" 
  img src=   
  "/jobindsats/viewer/resources/com.sas.jobindsats.ui.palette.Palette/add.gif" 
  alt = "Tilf&oslash;j".</b>

到目前为止,代码不适用于我执行您指示的操作。您从未将任何内容分配给frm,因此一旦您访问frm.document等,它就会失败。。。
Sub makro()
Dim IE As Object
Dim frm As Object
Dim elc As HTMLHtmlElement

Set IE = CreateObject("InternetExplorer.Application")
With IE
    .Visible = True
    .navigate "http://www.jobindsats.dk/sw167.asp"
    Do Until .readyState = 4: DoEvents: Loop
    End With

    frm.document.getElementByID("form_gruppe_maalingsgrupper_0_maalinger_1_radio").Click
        Application.Wait DateAdd("s", 1, Now)

    frm.document.getElementByID("nextbutton").Click
        Application.Wait DateAdd("s", 1, Now)

      'Ledighedstype
     frm.document.all("databank_form_forcedDimensions_0_placeholder_dual_choices").Options(1).Selected = True
        Application.Wait DateAdd("s", 2, Now)
        'doesnt work
   Set elc = frm.document.all.Title("Tilf&oslash;j")
   For Each elc In frm.document.all
   If elc.onclick = "form_gruppe_maalingsgrupper_0_maalinger_1_radio" Then
    elc.Click
   End If
 Next
End Sub