Hello,
I have a workbook that receives its data from a webpage but also requires a username and password. I'd like the workbook to be run by task scheduler but the issue I'm having is when using task scheduler a windows security box opens prompting for username and password. I've checked the box for the credentials to be remembered, which it does, but a key press is required to hit OK. So far I've tried
Which only presses the enter key before the security window pops up and
has the security window popping up before the enter key is pressed and access to excel isn't allowed until the security window goes away. Is there a way to sleep the sendkey command for a few seconds and skip to the next VBA line so when the security window opens the sendkey command is being sent?
I have a workbook that receives its data from a webpage but also requires a username and password. I'd like the workbook to be run by task scheduler but the issue I'm having is when using task scheduler a windows security box opens prompting for username and password. I've checked the box for the credentials to be remembered, which it does, but a key press is required to hit OK. So far I've tried
VBA Code:
SendKeys "~", True
ActiveWorkbook.RefreshAll
Which only presses the enter key before the security window pops up and
VBA Code:
ActiveWorkbook.RefreshAll
SendKeys "~", True
has the security window popping up before the enter key is pressed and access to excel isn't allowed until the security window goes away. Is there a way to sleep the sendkey command for a few seconds and skip to the next VBA line so when the security window opens the sendkey command is being sent?