Excel/VBA - Website Accessing

Bullstrik1

Board Regular
Joined
Jul 31, 2014
Messages
66
Hello Everyone!

I am banging my head against the wall for 2 days now with this issue, and so i come here humbly asking for your help or piece of advice that alow me to progress.


I have this website i would like to access and log in: Via Verde

And the code i am using is this:

Code:
Sub AbreSiteEcolocaPassword()



'to refer to the running copy of Internet Explorer
Dim IE As InternetExplorer
'to refer to the HTML document returned
Dim Doc As HTMLDocument, Fr As HTMLFrameElement, Form As HTMLFormElement, Ele As HTMLInputElement


'open Internet Explorer in memory, and go to website
Set IE = New InternetExplorer


With IE
        .Visible = True 
        .navigate ("http://www.viaverde.pt/Website/")
        While .Busy Or .readyState <> 4: DoEvents: Wend
            
                ' Código para fazer log in no site Via Verde através do InternetExplorer
                
                Set Doc = .document.forms("WebForm1")
                
           With Doc
                               
                For Each Ele In .getElementsByTagName("INPUT")
                    
                Next Ele
           End With
        
        
'                   .getElementById("webform1").Focus
'                   .getElementById("wtEmailInput").Value = "LOGIN"
'                   .getElementById("wtPasswordInput").Focus
'                   .getElementById("wtPasswordInput").Value = "PASSWORD"
'                   .getElementById("wt14").Click
        
        
End With




End Sub

My problem is that i cant log in in the website so i tried several ways, and in the end i don't know what i can i do anymore.
Hopefully, any of you could point me in the right direction by giving me some piece of advice here.


As i understood, the webpage is formed by some sort of login form. The thing is that i cant access the log in field or the password field.


I sincerely apretiate, in advance, any help you could give me.
Cheers all :)
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi all!

I forgot to say that i'm using windows 7 with 64 bit Office.

I'm rlly glad i could help, but i can't take no credit from the code, i just found it somewhere arround the web :)

Cheers all ;)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top