Sign in to follow this  
Followers 0
Aciano

Excel and Update prompt upon open

3 posts in this topic

Hi,

as my Topic Title already describe little bit of my problem. I need Locodarwin's UDF to open an Excel file (that is not a problem), but this specific file has cells liked to other Excel sheets and if the dependant values change in those dependent files, in Excel the prompt comes up to decide to update the related cells or not. However, I know about the possibility to change this in Excel options, but I don't want to do it that way. I tried to send keys like Space and Enter, but it didn't work (actually it sends the key after I manually hit a button - so it is actually waiting for the first operation to finish - in my case it is the opening an Excel file). Can someone help me with this? Is there some workaround? All options are welcomed and appreciated. Txs,

AC

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Nobody really faced this problem? God dammit, why do I always have to be the first one? :D

Edited by Aciano

Share this post


Link to post
Share on other sites

I need Locodarwin's UDF to open an Excel file (that is not a problem), but this specific file has cells liked to other Excel sheets and if the dependant values change in those dependent files, in Excel the prompt comes up to decide to update the related cells or not. However, I know about the possibility to change this in Excel options, but I don't want to do it that way. I tried to send keys like Space and Enter, but it didn't work (actually it sends the key after I manually hit a button - so it is actually waiting for the first operation to finish - in my case it is the opening an Excel file). Can someone help me with this? Is there some workaround? All options are welcomed and appreciated.

The pop up may come while $oExcel.Workbooks.Open() is in progress, and therefore while the AutoIt script is blocked. AutoIt is not multi-threaded, so it can't do anything else while blocked... at least in the same process. You could spin off an independent "Sentry Process" just to watch for and deal with this pop up. Code a short script that just loops, waiting for the pop up, and closes it and exits when found. Just before you do _ExcelBookOpen() do Run("SentryScript.au3") first.

Another possibility: You could take the code for _ExcelBookOpen() and modify it to change that behavior. Before that function does the actual .Open method, several properties are set on the $oExcel object. Perhaps you can set a property that will take care of this before .Open is done. I don't know enough about it to say if that's possible.

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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