KevinPhilips
07-31-2013, 11:41 AM
Hi everyone,
I received an Excel VBA Project which links from a button to a IE Object. On this website you have to log in with an account-name and password. There are about 20 users (account-name and password combinations) saved in an Access database. A third column indicates if the user login is being used or not (via a "x" or no "x"). When you click the above mentioned button, the Excel macro seeks for a row that does not have an "x" behind the user login. Then it collects it and gives it to the IE.Object.
So far so good... Now the code triggers an Application.Ontime Event (for 5 minutes passing from NOW) to log out and remove the "x" behind the user login in the access database.
Problem: Of course, when you close Excel before these 5 minutes are passed, the Ontime Event is never triggered. Therefore the "x" stays. That meaning, after this happens 20 times there are no free user logins to choose from.
Do you guys have alternatives for Application.Ontime or even a fix in mind since this whole scenario is not ideal.
Hope you guys can understand my broken English :) Unfortunately, it does not make sense to post code because it is spread throughout 5 modules and 10 different Subs/Functions.
Thank you guys so much in advance.
Kevin
I received an Excel VBA Project which links from a button to a IE Object. On this website you have to log in with an account-name and password. There are about 20 users (account-name and password combinations) saved in an Access database. A third column indicates if the user login is being used or not (via a "x" or no "x"). When you click the above mentioned button, the Excel macro seeks for a row that does not have an "x" behind the user login. Then it collects it and gives it to the IE.Object.
So far so good... Now the code triggers an Application.Ontime Event (for 5 minutes passing from NOW) to log out and remove the "x" behind the user login in the access database.
Problem: Of course, when you close Excel before these 5 minutes are passed, the Ontime Event is never triggered. Therefore the "x" stays. That meaning, after this happens 20 times there are no free user logins to choose from.
Do you guys have alternatives for Application.Ontime or even a fix in mind since this whole scenario is not ideal.
Hope you guys can understand my broken English :) Unfortunately, it does not make sense to post code because it is spread throughout 5 modules and 10 different Subs/Functions.
Thank you guys so much in advance.
Kevin