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.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,607
Messages
5,765,396
Members
425,281
Latest member
tmoreira001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top