Hi
I am very new to VBA, and I am using a working model to learn as I go. So appologies for my lack of correct terminology etc.
Basically I am trying to download sales figures from our IBM COGNOS sales database using VBA code.
I have no issue opening the page with the data I want.
Using:
Sub OpenPage()
Set browser = CreateObject("InternetExplorer.Application")
browser.navigate ("http://blahblahblahblah")
browser.StatusBar = False
browser.Toolbar = False
browser.Visible = True
browser.Resizable = False
browser.AddressBar = False
End Sub
This brings up a page with a table.
Manually, I can download a .csv file to bring this into excel for manipulation.
This is done by clicking on a button which brings up a prompt asking if I want to open or save the ppweb.csv file. (I want to save it, lets say to the desktop for now)
I am assuming this is all now in JavaScript (the icon is a gif button). Therefore when I run a recorded macro whilst manually clicking to save the ppweb.csv file, it brings up this module code:
Workbooks.Open filename:= _
"http://blahblah"
ActiveWindow.Visible = False
Windows("ppdscgi.exe").Visible = True
End Sub
When i right click/properties onto the gif icon on the COGNOS page the URL for the icon is the same as the purple above.
The trouble I encounter is then when I re-run the code, it brings up a COGNOS webpage which is not related (I assume it is bringing up the ppdscgi.exe) It is not leaving me with an open .csv file from which I am easily able to manipulate the data.
Is there anyway I can complete what I want to do fully automatically?
The URL is an intranet, password incripted site, and therefore these links will not work. Therefore, sorry if you don't have enough information to complete this request.
Any help you could provide me would be greatly welcome.
Kind regards
Ross
I am very new to VBA, and I am using a working model to learn as I go. So appologies for my lack of correct terminology etc.
Basically I am trying to download sales figures from our IBM COGNOS sales database using VBA code.
I have no issue opening the page with the data I want.
Using:
Sub OpenPage()
Set browser = CreateObject("InternetExplorer.Application")
browser.navigate ("http://blahblahblahblah")
browser.StatusBar = False
browser.Toolbar = False
browser.Visible = True
browser.Resizable = False
browser.AddressBar = False
End Sub
This brings up a page with a table.
Manually, I can download a .csv file to bring this into excel for manipulation.
This is done by clicking on a button which brings up a prompt asking if I want to open or save the ppweb.csv file. (I want to save it, lets say to the desktop for now)
I am assuming this is all now in JavaScript (the icon is a gif button). Therefore when I run a recorded macro whilst manually clicking to save the ppweb.csv file, it brings up this module code:
Workbooks.Open filename:= _
"http://blahblah"
ActiveWindow.Visible = False
Windows("ppdscgi.exe").Visible = True
End Sub
When i right click/properties onto the gif icon on the COGNOS page the URL for the icon is the same as the purple above.
The trouble I encounter is then when I re-run the code, it brings up a COGNOS webpage which is not related (I assume it is bringing up the ppdscgi.exe) It is not leaving me with an open .csv file from which I am easily able to manipulate the data.
Is there anyway I can complete what I want to do fully automatically?
The URL is an intranet, password incripted site, and therefore these links will not work. Therefore, sorry if you don't have enough information to complete this request.
Any help you could provide me would be greatly welcome.
Kind regards
Ross
Last edited by a moderator: