Sign in to follow this  
Followers 0
yappernj

Problems with Automating Excel VBA Programs in Win 8

1 post in this topic

I have been using AutoIt for years to automate the execution of a number of Excel VBA programs overnight. I am sucessfully running it in Win XP with Excel 2003 and Win 7 with Excel 2007.

I recently bought a Win 8 machine with Excel 2010 and I am having a very strange problem that I hope someone could help me with. The Excel VBA programs are launched using AutoIt. The VBA program prompts for file locations which AutoIt is able to enter using either ControlSetText or Send. The file folder location contain multiple xlsx files and the Excel VBA is instructed to loop through all the files in the folder, perform some manipulation, then put up a message box indicating that it is done.

When AutoIt launches the program, it answers the prompts corerctly, but the VBA stops after opening the 1st file in the folder. I get no error messages from Excel or from AutoIt, as is just waiting for the message box to appear.

The weird problem is this; when I run these Excel programs manually (in other words, I manually enter the folder paths or click my way to them, the VBA programs run fine. When I put a break point in the Excel program and launch it with AutoIt, I can see that all of the files in the folder are found. Also, when I manually step through the program when it stops at the breakpoint, it successfully runs.

So, this seems to me to be some kind of permissions thing with AutoIt and Win8. I have turned off UAC, set my AutoIt exe's to be Run as Administrator, tried all sorts of Trust Center stuff and still it does not successfully run unattended.

Would anybody have any suggestions to try? I am at my wits end with this.

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0