PDA

View Full Version : IE VBA controls



photon_ed
01-23-2008, 09:04 AM
Hello all,
I am trying to automate a series of repetitive commands from a web application. So I would very much appreciate it if someone can follow this through with me.
I got as far as opening a internet explorer though I would need to know the vba commands to navagate through the website(i.e. type in search box, selecting scroll down menu...etc)
Please see below for details and advise.
Many thanks

Regards,
Ed

Sub Google()
Set ie = CreateObject("internetExplorer.application")
'Set objshell = creatobject("wscript.shell")
With ie
.Navigate http://google.com/
.Visible = 1
End With
'wait a while until IE as finished to load
Do While ie.Busy
DoEvents
Loop

Norie
01-23-2008, 09:13 AM
Ed

What details?:dunno

For this sort of thing they are essential.

And it's not really VBA you should be worrying about but how the particular site you are trying to work with is designed.

photon_ed
01-23-2008, 09:30 AM
thanks for the prompt response Norie.
If we are working with the website bleow. I would be greatful if you will be able to tell me the vba codes to search and navagate the site. I get the feeling that one will need to correspond the commands to the HTML codes of the site.
Please advise, many thanks
http://www.independent.co.uk/

Regards,
Ed

Norie
01-23-2008, 09:40 AM
Ed

Yes we would need to know the HTML code, but I think we would also need a little more detail.

photon_ed
01-23-2008, 10:01 AM
Let start of with the site below
http://metro.co.uk

and search for the below in search box
"Little green 'naked' alien (http://www.metro.co.uk/weird/article.html?in_article_id=84910&in_page_id=2)"

click on the first entry under weird titled
1 Little green 'naked' alien discovered on Mars (http://www.metro.co.uk/weird/article.html?in_article_id=84910&in_page_id=2)

Thanks Norie =)

Regards,
Ed

photon_ed
01-24-2008, 02:42 AM
Any news guys?
regards,
Ed

Norie
01-24-2008, 03:41 AM
Ed

Yes, there's 1562 lines of HTML code on that page and I'm afraid I've not got the time to go through it all.:)

Try a board search - there are examples of this sort of thing out there.

photon_ed
01-24-2008, 04:14 AM
thanks for the respose though I was really only asking for general instructions.
I would appreciate it if you can point me to the right direction with a couple if links perhaps.
many thanks

regards,
Ed