Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

Results 1 to 1 of 1

Thread: vba web page how to make click on a grid?

  1. #1
    Join Date
    5th September 2017

    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!
    Last edited by samaipata; 2 Weeks Ago at 21:06.

    Excel Video Tutorials / Excel Dashboards Reports

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Click a IE9 Web Page button using VBA
    By dejamls in forum Excel VBA / Macros
    Replies: 9
    Last Post: June 24th, 2017, 22:20
  2. Grid search and populate text from grid in new cell
    By willco123 in forum Excel General
    Replies: 1
    Last Post: February 9th, 2017, 01:36
  3. Click on button to make text appear in cell
    By her.rockstar in forum Excel General
    Replies: 3
    Last Post: August 27th, 2013, 19:06
  4. Replies: 7
    Last Post: January 25th, 2011, 23:30
  5. Make chart on more than 1 page
    By stan208 in forum Excel General
    Replies: 1
    Last Post: April 14th, 2006, 22:35


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts