Consulting

Results 1 to 3 of 3

Thread: Access VBA sign into web URL

  1. #1

    Access VBA sign into web URL

    Trying to get some VBA code I found here to work and am not having any luck. I get "Run Time Error 91 - Object variable or with block variable not set"
    Here is the code.....

    Private Sub Command0_Click()
    Set ie = CreateObject("InternetExplorer.Application")
    With ie
    .Visible = True
    .Navigate "https://etrax.datamatx.net/signon.asp"
    Do Until .ReadyState = 4
    DoEvents
    Loop
    .Document.all.Item("loginUserName").Value = "username"
    .Document.all.Item("loginUserPassword").Value = "password"
    .Document.Forms(0).submit
    End With

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    The Variable that you are using for Internet Explorer "ie" has not been Dimensioned for Access VBA to allocate memory space to it.

    Try
    Dim ie as Object

  3. #3
    Quote Originally Posted by talliaman64 View Post
    Trying to get some VBA code I found here to work and am not having any luck. I get "Run Time Error 91 - Object variable or with block variable not set"
    [...]
    .Document.all.Item("loginUserName").Value = "username"
    .Document.all.Item("loginUserPassword").Value = "password"
    The web page does not contain any element named "loginUserName".
    Learn VBA from the ground up with my VBA Online Courses.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •