Consulting

Results 1 to 2 of 2

Thread: Fill Internet Form

  1. #1
    VBAX Newbie
    Joined
    Mar 2018
    Posts
    1
    Location

    Fill Internet Form

    I am having some troubles running a few lines of VBA. Here is what I have so far.

    Sub FillInternetForm()
    Dim IE As Object
    
    Set IE = CreateObject("InternetExplorer.Application")
    'create new instance of IE. use Reference to return current open IE if
    'you want to use open IE window. Easiest way I know of is via title bar.
    
    IE.Navigate "https://app.hubspot.com/sales/4267135/deal/265175492/?interaction=note"
    'go to web page listed inside quotes
    IE.Visible = True
    
    While IE.busy
    DoEvents 'wait until IE is done loading page.
    Wend
    
    IE.Document.All("percentage_to_close").Click
    IE.Document.All("percentage_to_close").Value = ThisWorkbook.Sheets("sheet2").Range(F35)
    End Sub



    My goal is to take the numeric value in cell F35, and place it into the field on IE9. However, when I run this, it comes back with an Error 424 'object required'

    When I run the script without the "IE.Document.All("percentage_to_close").Click" the error I receive is an Error 9 "Subscript out of range" So I assume I have to direct the script towards the button that allows me to edit this field, hence the .Click.

    However, when I inspect the elements of the page, the name for the button does not appear, I don't see it referencing a button name, just the class, the style, etc.

    Below is a dropbox link that contains a screen shot of the form and a screenshot of the elements view on Google Chrome.

    https://www.dropbox.com/sh/wmseo3dhl...4drW0z-Aa?dl=0
    Attached Images Attached Images
    • File Type: jpg 2.jpg (20.1 KB, 7 views)
    • File Type: jpg 1.jpg (8.2 KB, 5 views)
    Last edited by SamT; 03-17-2018 at 01:44 PM. Reason: Added Code Formatting Tags via # icon

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Moderator Bump
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

Tags for this Thread

Posting Permissions

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