Announcement

Collapse
No announcement yet.

VBA : Passing Username and Password for website

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VBA : Passing Username and Password for website



    I have the following String created to send a request to a website location. I would like to pass the required Username and Password to provide authentication when I send the request.

    Any suggestions?

    strFaceUrl = "http://.com/W/servlet/EcnRptFacePage.xml?ecn_in=" & TextBox1.Text & ""
    ThisWorkbook.FollowHyperlink strFaceUrl

    Thanks for the help,
    john

  • #2
    I'm throwing this out...NOT literally but just to see if anyone has a suggestion for the code below so that it sends authentication with the request.

    Without username and password a popup window opens and requests username and password. Is there a step or two I'm missing to complete authentication?

    Private Sub CreateBOM_Click()
    Dim strBomChgUrl As String
    Dim username As Variant
    Dim password As Variant

    strBomChgUrl = "http://.com/W/servlet/ EcnRptBomChange.xml?ecn_in=" & TextBox1.Text & "" + username = "user" & password = "pass"
    ThisWorkbook.FollowHyperlink strBomChgUrl

    End Sub

    Comment


    • #3
      Hi John,

      How about.

      "http://user[email protected]/W/servlet/ EcnRptBomChange.xml?ecn_in=" & TextBox1.Text

      Chers
      Andy

      Cheers
      Andy

      Comment


      • #4


        Hi Andy,

        Thanks for the suggestion...it didn't take.

        I think I need to dig a little more to verify I'm passing username and password as it would be requested by the java script.

        cheers,
        John

        Comment

        Working...
        X