Hey guys, first time poster and hoping for some genuine vba guru assistance to a "final hurdle" I have with a workbook I'm working on which will be used solely "at work" on a company "intranet" as opposed to the general internet persay.
I can, "when at work", manually login my workbook in to company servers to extract "live" data via the use of web queries but badly wish to "eliminate" the need for "the user" to "login" to company servers each and every time the workbook is fired up.
Instead I wish to build a macro which supplies a "generic username and password" to the servers and automatically logs the user in and there in turn begins the auto update of web queries I have already built in to my sheet, based on the time intervals I have set in the query properties.
So far I have managed to build a macro in to my sheet which auto logs the user in to and opens a webpage on the company server. I did extract the necessary element id's etc from the webpage source info but so far am lost as to how to put this info in to a usable macro with which to enable my web queries to then auto update.
Basically, I want the macro to simply log the user in to a company server, "NOT" to open a webpage but simply so my sheet logs itself on the server in the background thereby enabling my queries to begin...
The usable info I used when making my ie macro were as follows: Please exscuse me if I have included script which is not required, but for security reasons also am a little reluctant to post entire page which is not normally visible to anyone "outside" my companyt without a valid login id and password.
If anyone at all can possibly help I would be extremely grateful,
Regards, Lplater
td class="paraContent"><input name="j_username" id="j_username" type="text">
td class="paraContent"><input name="j_password" id="j_password" type="password">
<input id="idHiddenButton" type="submit" value="" style="display: none; width: 0px;">
<span><a onfocus="this.***********()" title="Sign In" style="text-decoration: none;" ***********="window.status=this.title;document.getElementById('idButtonLoginText').className='largeButtonTextCellOn';return true;" **********="window.status='';document.getElementById('idButtonLoginText').className='largeButtonTextCellOff';" *******="*******_idButtonLogin();return false;" href="#" onblur="this.**********()"><table id="idButtonLogin" cellspacing="0" class="largeButton"><tbody><tr><td class="largeButtonImgCell"><img border="0" src="/maintenix/servlet/image/key.gif"></td><td nowrap="" id="idButtonLoginText" class="largeButtonTextCellOff">Sign In</td></tr></tbody></table></a><span style="display: none">.</span></span>******** type="text/javascript" language="Javascript">
<!--function *******_idButtonLogin() {buttonAction_idButtonLogin();}function buttonAction_idButtonLogin() { document.getElementById( 'idHiddenButton' ).click();}// -->
I can, "when at work", manually login my workbook in to company servers to extract "live" data via the use of web queries but badly wish to "eliminate" the need for "the user" to "login" to company servers each and every time the workbook is fired up.
Instead I wish to build a macro which supplies a "generic username and password" to the servers and automatically logs the user in and there in turn begins the auto update of web queries I have already built in to my sheet, based on the time intervals I have set in the query properties.
So far I have managed to build a macro in to my sheet which auto logs the user in to and opens a webpage on the company server. I did extract the necessary element id's etc from the webpage source info but so far am lost as to how to put this info in to a usable macro with which to enable my web queries to then auto update.
Basically, I want the macro to simply log the user in to a company server, "NOT" to open a webpage but simply so my sheet logs itself on the server in the background thereby enabling my queries to begin...
The usable info I used when making my ie macro were as follows: Please exscuse me if I have included script which is not required, but for security reasons also am a little reluctant to post entire page which is not normally visible to anyone "outside" my companyt without a valid login id and password.
If anyone at all can possibly help I would be extremely grateful,
Regards, Lplater
td class="paraContent"><input name="j_username" id="j_username" type="text">
td class="paraContent"><input name="j_password" id="j_password" type="password">
<input id="idHiddenButton" type="submit" value="" style="display: none; width: 0px;">
<span><a onfocus="this.***********()" title="Sign In" style="text-decoration: none;" ***********="window.status=this.title;document.getElementById('idButtonLoginText').className='largeButtonTextCellOn';return true;" **********="window.status='';document.getElementById('idButtonLoginText').className='largeButtonTextCellOff';" *******="*******_idButtonLogin();return false;" href="#" onblur="this.**********()"><table id="idButtonLogin" cellspacing="0" class="largeButton"><tbody><tr><td class="largeButtonImgCell"><img border="0" src="/maintenix/servlet/image/key.gif"></td><td nowrap="" id="idButtonLoginText" class="largeButtonTextCellOff">Sign In</td></tr></tbody></table></a><span style="display: none">.</span></span>******** type="text/javascript" language="Javascript">
<!--function *******_idButtonLogin() {buttonAction_idButtonLogin();}function buttonAction_idButtonLogin() { document.getElementById( 'idHiddenButton' ).click();}// -->
Last edited: