+ Reply to Thread
Results 1 to 3 of 3

automate some steps in IE with vba

  1. #1
    Registered User
    Join Date
    11-14-2019
    Location
    Bucharest
    MS-Off Ver
    2010
    Posts
    2

    automate some steps in IE with vba

    Hello everyone,

    I have some issues with a scrap code that i gather from different sites, when trying to automate some process on a Internet Explorer page.


    this are the issues that is stumbled on:
    1. i add "Microsoft HTML Object Library" and "Microsoft Internet Controls", but when i enter again in the excel, they are not saved (.XLSM)
    2. on the computer that i wanna automate the process, this is the step that is not working (even if on another computer is not having problems) - SetForegroundWindow HWNDSrc
    3. the script that i scraped is not so good, doing some monkey stuff (like using the Tab button, 20 times). i was trying to change`t with a search for Name ID, but the program from the IE, is closed and is not permitting to inspect the elements.
    so the third thing, there is any vba tool, that permit to find the Name ID, of a element that i click on?

    the code that i made, is bellow

    Please Login or Register  to view this content.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: automate some steps in IE with vba

    I have not used the HTML reference too much, but you clarify what you mean by this?

    there is any vba tool, that permit to find the Name ID, of a element that i click on?

    if that's what you mean, you can actually capture webpage control values by writing VBA and you don't need any lib references to do it. in your code, you are looping through ALL of them on the page, regardless of type. in order to capture properties of controls, you have to write javascript code usually and the same thing applies in VBA. it's just not called JS. the syntax on the following page is probably what you need to write to get IDs of any controls, if they indeed have them:

    https://www.w3schools.com/jsref/prop_html_id.asp

    also, for a lot of information of how to automated IE and/or do a little scraping of webpages without using SHELL, but rather just a simple IE object instance, see here:

    https://www.access-programmers.co.uk...ng-vba.176968/

  3. #3
    Registered User
    Join Date
    11-14-2019
    Location
    Bucharest
    MS-Off Ver
    2010
    Posts
    2

    Re: automate some steps in IE with vba

    vba_php: Thank you for the answer. I will look on the links.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to Label Cell A1 as Q7-Q23
    By Nana Yaw in forum Excel General
    Replies: 7
    Last Post: 08-31-2017, 11:57 AM
  2. [SOLVED] VBA In Easy Steps
    By ALEXJM in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-21-2017, 06:27 PM
  3. [SOLVED] Automate These Steps
    By ssjagger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2016, 12:46 PM
  4. Excel VBA to automate the steps involved while extracting the .TXT file
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2015, 11:42 PM
  5. Excel vba to automate the steps involved while extracting the txt file (Part2)
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2015, 11:40 PM
  6. Calculating steps
    By slafever in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-25-2008, 02:34 PM
  7. [SOLVED] steps to eM URL?
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 03-05-2006, 04:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1