Is it possible for a macro to log into a website

Jackblack1

Active Member
Joined
Feb 10, 2004
Messages
266
Good Morning

Is it possible to set up a macro to log into a website with the username and password, and copy the information from the page it opens up to into an excel. I would give further information, but I want to find out if something like is possible.

Thanks

Jim
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Jim

It could be possible using VBA.

To give further details can you give more information?
Code:
Sub test()
    Set ie = CreateObject("InternetExplorer.application")
    ie.Visible = True
    ie.navigate ("HTTPS://dwayinstalls.hns.com/forms/viewservice.jsp?id=" & ActiveCell)
    Do
            If ie.readyState = 4 Then
                ie.Visible = True
                Exit Do
        Else
            DoEvents
        End If
    Loop
    
    ie.document.forms(0).all("User").Value = "me"
    ie.document.forms(0).all("Password").Value = "mypasssword"
    ie.document.forms(0).submit
End Sub
 
Upvote 0
Hi Norie

Thanks for taking my post, I tried your code up to getting onto the website, it work perfect. For the username on the website, the cursor is the first thing flashing when you get to the site, its the first entry. The password is a little more tricky, if you tab it is the second entry possible to enter. The tricky part is I would need to set up a popup box to enter in the password because the user has a key coder that generates a new password every minute. This is the way it set up.

User Name:

SecurID®Password/Pin+ 6 digit code:
 
Upvote 0
Jim

So what do you need help with?

The inputbox or enteringthe password on the web page?
 
Upvote 0
I need help to get the username to pop in the box and the popbox for the password, I used the code from the macro you gave me but this is first time I've done this so it didn't turn out to work.
 
Upvote 0
Jim

Sorry I'm not following you.:)

Do you want code to get user input, then put that input onto the web page?
 
Upvote 0
Ok Norie, I got to pop the username and password, it's the popup box that populates the passwrd that I need.
 
Upvote 0
Sorry About that...It is the user input to the popup box that will insert the password in the field. Because the password changes each minute so there is no way to hard code it
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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