ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to detect if user has a dialogbox open (https://www.excelbanter.com/excel-programming/287579-how-detect-if-user-has-dialogbox-open.html)

Von Shean

how to detect if user has a dialogbox open
 
My timer macro reads valus from a workbook on one instance of excel and
updates another workbook in another instance of excel.
Sometimes data is large so i turn off screen updating on the recieveing
workbook.
When the user opens a dialogbox in one excel and the macro is running, I get
a ScreenUpdating failed error.
This also happens when the user is editing a cell and the macro runs.

Is there anyway i can detect an open dialogbox ??



Paul Robinson

how to detect if user has a dialogbox open
 
Hi,
Could you set a public variable to True when the DialogBox opens and
False when it closes. Then your Timer macro would not run if the
variable was True.
Don't know about the cell editing problem - perhaps something can be
done with the Worksheet_Change event.

regards
Paul


"Von Shean" wrote in message ...
My timer macro reads valus from a workbook on one instance of excel and
updates another workbook in another instance of excel.
Sometimes data is large so i turn off screen updating on the recieveing
workbook.
When the user opens a dialogbox in one excel and the macro is running, I get
a ScreenUpdating failed error.
This also happens when the user is editing a cell and the macro runs.

Is there anyway i can detect an open dialogbox ??


Von Shean

how to detect if user has a dialogbox open
 
I want make a clarification. The dislog box is not my dialog box...it could
be any excel dialog box also.

I have a workaround for detecting the editing of cell. This is to check if
File-Open is enabled. But i dont think it as a good solution

Any comments......

"Paul Robinson" wrote in message
om...
Hi,
Could you set a public variable to True when the DialogBox opens and
False when it closes. Then your Timer macro would not run if the
variable was True.
Don't know about the cell editing problem - perhaps something can be
done with the Worksheet_Change event.

regards
Paul


"Von Shean" wrote in message

...
My timer macro reads valus from a workbook on one instance of excel and
updates another workbook in another instance of excel.
Sometimes data is large so i turn off screen updating on the recieveing
workbook.
When the user opens a dialogbox in one excel and the macro is running, I

get
a ScreenUpdating failed error.
This also happens when the user is editing a cell and the macro runs.

Is there anyway i can detect an open dialogbox ??





All times are GMT +1. The time now is 01:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com