Trying to control Internet Explorer with VBA, can someone help?

mrdavie007

New Member
Joined
Jul 5, 2011
Messages
6
I'm trying to download a file from my bank to import my transactions to excel. I've managed to write enough to get logged in and that's about it. I can't seem to much of anything from there. Here's the web site and 'demo' login info.
https://www.bancfirstonline.com/onlineserv/HB/Signon.cgi
Username '999999999' pass '1234'

I'd like to click on the 'Export' link and then enter info to get my file but like I said, I'm stuck. I've spent about 15 to 20 hours pouring over everything I can find online but I can't find what to do once I've slected the frame that the button is in. I believe ist's name is "primary." Am I just missing it? If anyone has any clue what's going on, I'd be very appreciative.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
The details you added won't allow access.

My suggestion is. In Excel Record a macro and then select to use the Data Tab and From Web go through the motions of going to the website enter your details then select the table area to download into Excel.

Then once you have the details in Excel stop recording and you can then explore the code.
 
Upvote 0
Trevor
Thanks for the tip, I'll try that. Not sure why you couldn't login to the demo. I tried it twice just a moment ago. First time failed, the second succeeded and I don't know what I did different.
 
Upvote 0
Just tried again didn't let me in.

How many 9's are you entering?
 
Upvote 0
Yeah, I got it. There are nine nines but the trick is you have to click the 'demo' button first and allow the popup, then go back to the other window and then log in. How annoying is all of that?
 
Upvote 0
Using the web element in Excel doesn't give you the option to Select the table area, I don't know if this is because of it being a demo area!

However I did notice there is an option at the bottom to download as CSV file.

Have you been successful with the Recording Macro idea?
 
Upvote 0
The webquery won't work I think because of the security level. It doesn't let me select much of anything from any of the pages that are past the login even if I use my credintials. What I am trying to do is download the csv file but the trouble I'm having is selecting the 'Export' button to go to that page.
 
Upvote 0
I have tried this to see if it will download, perhaps there is a better method, but it got data into my workbook.

Sadly I am not an expert with the webquerying options.

Sub Login_WebQuery()
Dim MyPost As String
Const MyUrl As String = "http://www.business-spreadsheets.com/forum.asp?t=103" 'Change URL
Const PostUser As String = "login=User Name" 'Change user name here
Const PostPassword As String = "&pass=password" 'Change password here

MyPost = PostUser & PostPassword

With ActiveSheet.QueryTables.Add(Connection:= _
"URL;" & MyUrl, Destination:=Cells(1, 1))
.PostText = MyPost
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

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