Excel (VBA) to tries to pull data from a website but the page times out before it logs in

elpepin

New Member
Joined
Mar 5, 2014
Messages
1
Hello,
I've just obtained this addon but it's not working in the sense that it won't log in to the website it was meant to. In the VBA the data goes like this:

Sub logIntoCapsim(control As Object)
Dim x As Integer
Dim a As New agent
a.visible = True
a.openpage "http://www.capsim.com/business-simulations/homepage.cfm", True

a.document.all("userID").Value = "JoseSuarez"
a.document.all("userPassword").Value = "XXXXXX"

a.waitForLoad

a.openpage "http://www.capsim.com/cgi-bin/displayReport.cfm?Report=CapCourier#frontpage", True
a.importPage "Capsim Courier"
End Sub

It goes as far as inputting my user name and password but almost instantly the window displays:
"Your session has expired due to inactivity, please log in again"

Is there something wrong with the VBA?


This stuff is way over my head please help me!

PS
I didn't display the password for obvious reasons.
 

Forum statistics

Threads
1,081,560
Messages
5,359,608
Members
400,538
Latest member
leon_oscar

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top