Results 1 to 4 of 4

Thread: HTML Object (createDocumentFromUrl) - Wont click

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    HTML Object (createDocumentFromUrl) - Wont click

    im stuck. I cant seem to click the button of a page using strictly the HTML object. I can click links.. but for some reason cant click a button?? any ideas?

    VB Code:
    1. Dim WithEvents HTML As HTMLDocument
    2. Dim COMPLETE As Boolean
    3. Dim tHTML As HTMLDocument
    4.  
    5. Private Sub Form_Load()
    6.     Set tHTML = New HTMLDocument
    7.     Set HTML = tHTML.createDocumentFromUrl("http://www.google.com/", vbNullString)
    8.     Debug.Print HTML.url
    9.    
    10.     Do Until COMPLETE
    11.         DoEvents
    12.     Loop
    13.    
    14.     HTML.documentElement.All.q.Value = "apples"
    15.     HTML.All.btnG.Click
    16.    
    17.     Do Until COMPLETE
    18.         DoEvents
    19.     Loop
    20.    
    21. End Sub
    22.  
    23. Private Sub HTML_onreadystatechange()
    24.     If HTML.readyState = "complete" Then COMPLETE = True Else COMPLETE = False
    25.     Debug.Print "HTML: " & HTML.readyState & "   " & HTML.url & "   " & COMPLETE
    26.    
    27. End Sub
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: HTML Object (createDocumentFromUrl) - Wont click

    anyone?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: HTML Object (createDocumentFromUrl) - Wont click

    Do you mean the ff. code does not do anything?

    Code:
    HTML.All.btnG.Click
    If yes then sorry but I had a similar problem with it a year ago and found no solution with such scenario...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: HTML Object (createDocumentFromUrl) - Wont click

    Just wondering, how are you checking that you can't click buttons?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

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



Click Here to Expand Forum to Full Width