Share via

Populate HTML forms using VBA?

Anonymous
2011-04-09T12:57:31+00:00

This is an general outline of the process I would like to code with VBA:

Using a reference number from Excel, I currently match it by a search in an HTML database, then search for the word(s) 'complied' (shown as a hyperlink) on a page with variable amounts rows of data.

I need to locate and click the last 'complied' hyperlink on the webpage, then search for the word 'passed' in the status field.

If not there, (say 'failed' found instead), then search back up the list on the page for the next 'complied' and again check for the word 'passed'.

If (or when) I find a 'passed' in the 'complied category, I copy several lines of text from the next field on the form, look up the list for the first 'acknowledged' hyperlink and paste this copied text into a 'notes' box, deleting 3 lines of standard text after having done this.

I then look at the end of the notes for a date/time, select the drop down day/month/year and hour/min listbox above and select the date time to match the date/times in the notes . The date in the notes is in year/monthday format but the dropdown box is in day/month/year format. The time in the notes is given in hr:min:sec but the drop down only in hr min, so times are matched to the nearest 5 min.

The cycle repeats by looking up the list for the next 'acknowledged' hyperlink and continues until all 'acknowledged' records have been updated with the 'passed' notes from the complied record

Finally, when the above is completed, a cell in Excel is filled red to indicate this process is complete.

At present I have 750,000 outstanding records to check and the list grows weekly so this is a process that could certainly benefit from full automation with VBA if possible.  I can use 'sendkeys' statements to cut down on the number of clicks and keystrokes, but my VBA knowledge is still at too elementary a stage to write all the code to fully automate this process.

I can upload to SkyDrive on Monday evening a complete process document, listing each stage clearly with a screenshot if anyone is able to tell me whether this process sounds like it's possible to code in VBA.

Is it possible?

Many thanks for your help!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2011-04-11T23:49:53+00:00

    What seems like a daunting task may become a lot easier when you break it into smaller components.  And, as you've already pointed out, experiments as you go through your course are probably the best way to learn the language.  All the best with your course.

    Thanks very much for your reply and help.  I've had a quick look at your link and I can see possibilities but don't have the level of skills necessary to even start to compile the code for this.  As I work through my online VBA course I'll return to it and try a few experiments.  At the moment, it looks a daunting task!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-04-11T10:24:56+00:00

    Thanks very much for your reply and help.  I've had a quick look at your link and I can see possibilities but don't have the level of skills necessary to even start to compile the code for this.  As I work through my online VBA course I'll return to it and try a few experiments.  At the moment, it looks a daunting task!

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-04-10T17:23:42+00:00

    I could be wrong -- and I often am {grin} -- but this seems more like a full fledged project rather than something that can be accomplished through a help forum.

    Depending on your programming skills and interest, you may be able to adapt for your own project the ideas at

    Using VBA to access the ’Net

    http://www.tushar-mehta.com/publish_train/xl_vba_cases/vba_web_pages_services/

    Was this answer helpful?

    0 comments No comments