IE Automation with VBA

abbaddon223

Registered User.
Local time
Today, 14:37
Joined
Mar 13, 2010
Messages
162
Hi Experts - I'm hoping someone can kindly help me please?

I have form with two fields:

Email
Result

I use the following code to open a web page and check if the domain is valid:

Dim ie As Object
Set ie = CreateObject("internetexplorer.Application")
ie.Visible = True

Dim URLSTART As String
URLSTART = "http://check.maxomail.com/?"

Dim URLEND As String
URLEND =

ie.Navigate URLSTART & URLEND

This gives me a single unformatted page result like the below

1. Good

Usually I would get the value from the page by referencing the ElementID. The problem herin is, there is no ID.

Has anyone got any ideas how I can get the value from the page back into the [Result] field?

Thank you for any help.

Phil.
 
...
This gives me a single unformatted page result like the below

1. Good
It is what you see, what is the HTML content behind the result page, (the Source code for the page)?
 
Try the below code, it gives you what you see in the attached picture.
Code:
  Dim ie As New InternetExplorer
  ie.Navigate "http://check.maxomail.com/?test@somedomain.com"
  Do
    DoEvents
  Loop Until ie.ReadyState = READYSTATE_COMPLETE
  MsgBox (ie.Document.DocumentElement.innerText)
attachment.php
 

Attachments

  • Bad.jpg
    Bad.jpg
    7.8 KB · Views: 210
Yep - did the trick. That's excellent and thank you for your help
 

Users who are viewing this thread

Back
Top Bottom