-2

i want t to fill same username and password for all the webpages i am opening.

even the webpages are different i want same username and pasword to be auto fill in all pages. Please help me on this. i am using IE and Chrome (Occasionally).

Ex : i opened https://10.165.233.345 & https://10.165.233.347 ...... etc in browser, but i need same username and password to be stored and auto filled.

Or i want my browser to auto fill same username and password when ever that option came even for new webpages which i haven't opened earlier.

Please help me

Phani
  • 1
  • 1

1 Answers1

0

We cannot fulfill your exact requirement but we can use the VBA code as a work around. From where you can run the Internet Explorer and open desired page and input username and password in it.

Below is the example, you can try to refer.

HTML code (demo52.html):

<!DOCTYPE html>
<html>
<body>
<h2> Sample Page</h2><br>
UserName: <input type="text" id="txt_username" value=""><br><br>
Password: &nbsp &nbsp<input type="password" id="txt_password" value=""><br><br>
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp <input type="submit" value="submit">
</body>
</html>

VBA Code:

Sub demo3()

Dim IE As InternetExplorer
Set IE = CreateObject("InternetExplorer.Application")
With IE
    .Visible = True
    .navigate "C:\Users\Administrator\Desktop\demo52.html"

    Do Until .readyState = 4
    DoEvents
    Loop

    .Document.all.Item("txt_username").Value = "abcde"
    .Document.all.Item("txt_password").Value = "12345"
   
End With
End Sub

Output in Internet Explorer:

enter image description here

Note: Try to add reference to library below in VBA Editor.

(1) Microsoft HTML Object Library.

(2) Microsoft Internet controls.

You can change the URL in code to open different pages or try to create an array and store all URLs in it and then use it in your code as per your requirement.

Further, you can try to modify the code by yourself.

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19
  • Why do you think he is able or willing to use VBA? – Rob Oct 22 '18 at 02:57
  • User did not clearly mentioned by which way he/ she want to fulfill the requirement. If user is using the code then this can be possible work around. otherwise user can save the username password manually in browser. – Deepak-MSFT Oct 22 '18 at 03:03