Using VBA to Log in to a website and clear previous login credentials
<p>I am currently using this <a href="https://stackoverflow.com/questions/24038230/fill-user-name-and-password-in-a-webpage-using-vba">Fill user name and password in a webpage using VBA</a> code to log in to a website but I am running into an issue. Since the username and password is already saved on the browser it is adding the uid/pass again and creating an error in the login process. Is there a way I can add some code to clear any previously input uid/pass? </p>

<pre><code>Sub test()
 ' open IE, navigate to the desired page and loop until fully loaded
Set ie = CreateObject("InternetExplorer.Application")
my_url = "https://hb2.bankleumi.co.il/e/Login.html"

With ie
    .Visible = True
    .Navigate my_url
    .Top = 50
    .Left = 530
    .Height = 400
    .Width = 400

Do Until Not ie.Busy And ie.readyState = 4
    DoEvents
Loop

End With

' Input the userid and password
ie.Document.getElementById("uid").Value = "testID"
ie.Document.getElementById("password").Value = "testPW"

' Click the "Search" button
ie.Document.getElementById("enter").Click

Do Until Not ie.Busy And ie.readyState = 4
    DoEvents
Loop
 End Sub
</code></pre>