Hi,
OK - I can get you logged in, but I'm not sure how you're going to proceed
from there. If you are taken directly to the page that you can pull data
from, then you should be able to parse out sResponse to get what you need.
If you are still a mouse click or two away, it becomes more difficult.
Anyway, the following code will get the HTML source for the page that is
displayed after you log in to the site. You must set a reference to
"Microsoft XML 4.0" via Tools | References in order to run the code. Modify
the SSN and PIN in the string to your SSN and PIN. To make it a bit safer
(so your SSN is not stored in the workbook), you may want to take in the SSN
and PIN via a UserForm or InputBoxes.
Public Sub test()
Dim xml As XMLHTTP40
Dim abytPostData() As Byte
Dim sMode As String
Dim sResponse As String
Dim nStartPos As Integer
Dim nEndPos As Integer
abytPostData = StrConv("SSN=111223333&PIN=1234&ml=https://" & _
"account.gwrs.com/Central/Login/FCLoginRedirector.Asp" & _
"menu_param=/tl001/menu/frameset.asp&AUTHORIZING=true&" & _
"bypass_oe=false", vbFromUnicode)
Set xml = New XMLHTTP40
With xml
.Open "POST", _
"
https://www.fascorp.com/servlet/AccountAccess/" & _
"Gwrs/individual_info"
.setRequestHeader "Content-Type", _
"application/x-www-form-urlencoded"
.send abytPostData
sResponse = .responseText
End With
Debug.Print sResponse
Set xml = Nothing
End Sub
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
Fun said:
http://www.gwrs.com/. Thanks for offering to help.
Jake Marx said:
Hi,
Please provide the URL (address) for the web page, and we may be
able to help out further. The process really depends on how the
page is set up.
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
Fun Kid wrote:
No, it is not a popup login dialog. The boxes for login and
password information is contained in the web page.
I'm happy to know that there is a way to do this. Thnx.
Hi Fun Kid,
What is the URL for the login page? Is it a popup login dialog, or
do the textboxes reside on the web page itself?
There are ways to do this, but they aren't terribly
straightforward.
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
Fun Kid wrote:
I would like to extract information from a my 401k website on a
regular basis and I intend to use an excel web query to do that.
But the website requires a user id and a password in order to
access the information. How can I do this?
Eventually, I would like to set up a macro using VBA for excel so
that each time I open the file, it will provide the website with
the user id and login, extract the data and plot the daily
balance.
Any suggestions would be appreciated.