- Nov 27, 2013
- Office Version
I know this questions has already been asked multiple times but unfortunately, there are a lot of different ways to code a website. I've tried several different ways to automate this and just can't get it to work. I'm trying to automate my login to https://3plservices.pharmarxorder.com/login using the below code. When I manually type in the username and password and then click on "Sign In" it works. When I use the below code, it appears to fill in both the username and password correctly and clicks the sign in but unfortunately, it just reloads the login page. I appreciate any help.
Sub test() ' open IE, navigate to the desired page and loop until fully loaded Set ie = CreateObject("InternetExplorer.Application") my_url = "https://3plservices.pharmarxorder.com/login" With ie .Visible = True .Navigate my_url Do Until Not ie.Busy And ie.readyState = 4 DoEvents Loop End With ' Input the userid and password ie.document.getElementByID("mat-input-0").Value = "UserName" ie.document.getElementByID("mat-input-1").Value = "PassWord" ' Click the "Search" button ie.document.forms(0).submit Do Until Not ie.Busy And ie.readyState = 4 DoEvents Loop End Sub