Issue with Excel macro

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
jpf1281
Newbie
Posts: 11
Joined: Mon Jun 14, 2021 1:40 pm

Issue with Excel macro

Post by jpf1281 » Tue Feb 06, 2024 6:07 pm

So this one is a little odd. We have an automation that opens an Excel file and refreshes the data in the file. The data is pulling from a SharePoint list that we have linked to a table. The automation works fine, but when it kicks off the refresh of the data, Excel asks for us to choose an account to log in with. We don't have to enter any credentials and there is only one account associated with this file.

The issue here is that the automation completely hangs when the popup comes up to choose a user to log in as. Because of this, I cannot use an image recognition automation or a mouse move to select the user account. This just causes the automation to hang until I get up in the am and go onto this laptop and select the user manually. Once I select the user manually, the automation continues where it left off, regardless of how long it is sitting on the screen with the popup to select the user.

Has anyone run into anything similar, or have a solution for this?

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Issue with Excel macro

Post by JRL » Tue Feb 06, 2024 9:38 pm

Windows security stops all script processing while that security window displays. Nothing running on that computer will be able to dismiss the window.

The solution I found requires a second computer and whatever vnc software you like. I like TightVNC. If you don't know VNC it allows remote access of a client computer without much overhead.
- Install VNC on both computers.
- Create a script that runs perpetually on the second computer looking for an image of a portion of the security window or better yet a pixel color that can be easily located on the security window. The script on the second computer will dismiss the security window on the primary computer.
- Log in to the Excel automation computer from the second computer using VNC
- Run the Excel automation script normally.
- Run the Security window dismissing script on the second computer
- If all is set up properly the second computer will act as you while you continue to sleep.

The OS permissions security has no affect on the actions of the second computer.

Hope this makes sense. If not ask and I'll try to clarify.

jpf1281
Newbie
Posts: 11
Joined: Mon Jun 14, 2021 1:40 pm

Re: Issue with Excel macro

Post by jpf1281 » Thu Feb 08, 2024 4:06 pm

Interesting. Thanks fore the info, much appreciated. We will give this a shot.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts