vba web page how to make click on a grid?

  • In macro vba excel 2010 with Win7 64bits...I would like to make a click on a grid with virtual keyboard
    Grid compose 16 cases..each case in class tag "case-xw pos-f" , "case-xw pos-e", "case-xw pos-g" In the webpage I use the mouse to click on the case and the number (in grid) is select and compose the password... with this loop vba i use the tag "span" exemple :
    <div classcode :="clavier-virtuel-item">
    <span class="case-xw pos-f" onmouseup="(function(e, o){ if(e.which){var tmp=e.which;if(tmp != 0 &amp;&amp; tmp != 1){return;}} else if(e.button){var tmp=e.button;if(tmp != 0 &amp;&amp; tmp != 1){return;}} clickClavierVirtuel(o); })(event, this)"></span>

    I use this macro :
    Set Helem = MyPageHtml.getElementsByTagName("span")
    For j = 14 To Helem.Length - 1
    Range("A" & (j + 1)).Value = Helem(j).getAttribute("class") & " / " & helem(j).getAttribute("onmouseup")
    If Range("A" & (j + 1)).Value Like "*pos-p" Then Helem(j).Click
    Next j

    I've add this line also :
    MyPageHtml.parentWindow.execScript "'function(e, o)'", "Javascript"

    I've no message error...But the Click don't work...How launch function(e, o) on onmouseup ???
    Thanks to help me!