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

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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
Back
Top