WEBSITE ACCESS AND VBA !!!

J

jay dean

Hello -

I have a userform that works beautifully.

(1)I need a macro / subroutine that I can use to access a website like,
say www.ZeeZZZ.com (just an exemple url) from the form.

(2)Also, if the website has a field for username & password, is there a
way to include this in the code so that it will automatically, open the
website and enter the username and password programatically?

Perhaps two separate macros for (1) and (2)?
Are the above possible at all?

Any help will be graetly apprecaited.

Thanks
Jay

*** Sent via Developersdex http://www.developersdex.com ***
 
R

r

jay dean said:
Hello -

I have a userform that works beautifully.

(1)I need a macro / subroutine that I can use to access a website like,
say www.ZeeZZZ.com (just an exemple url) from the form.

(2)Also, if the website has a field for username & password, is there a
way to include this in the code so that it will automatically, open the
website and enter the username and password programatically?

This link contains some examples
http://excelvba.altervista.org/blog/index.php/Excel-VBA/Gmail-eseguire-l-accesso.html

regards
r

Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/index.php/Excel-VBA/UsedRange-eccezioni-e-alternative.html
 
J

jay dean

I don't have a web page.. all I am trying to do is looking for a macro
and assign it to a form control that will open a web page like
"www.developersdex.com" in a standard web browser.

Also, if the site has a "username" and "password", can I include it in
the macro so that it automatically logs me in?

Jay


*** Sent via Developersdex http://www.developersdex.com ***
 
R

r

Each web page is a different world ...
to your page (www.developersdex.com) for example:

Sub developersdex_log()
'senza riferimenti ad altre librerie
Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")
Const READYSTATE_COMPLETE As Long = 4
Const myURL As String =
"http://www.developersdex.com/login.asp?refer=editprofile"

myIE.navigate myURL
myIE.Visible = True

Do While myIE.Busy Or myIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop
'scrivi la mail
myIE.document.all("Email").Value = "LogName" '<<
'scrivi la password
myIE.document.all("Password").Value = "YourPassword" '<<
'esegue l'accesso
myIE.document.all("Image1").Click

Do While myIE.Busy Or myIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop

End Sub



Sub developersdex_log_with_references()
'riferimenti a:
'"Microsoft Internet Controls"
'"Microsoft HTML Object Library"

Dim myIE As New InternetExplorer
Dim myDoc As HTMLDocument
Const myURL As String =
"http://www.developersdex.com/login.asp?refer=editprofile"


myIE.navigate myURL
myIE.Visible = True

Do While myIE.Busy Or myIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop

Set myDoc = myIE.document

With myDoc
'scrivi la mail
..all("Email").Value = "LogName" '<<
'scrivi la password
..all("Password").Value = "YourPassword" '<<
'esegue l'accesso
..all("image1").Click
End With

Do While myIE.Busy Or myIE.readyState <> READYSTATE_COMPLETE
DoEvents
Loop

End Sub

regards
r
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top