ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application.Interactive=true ignored? (https://www.excelbanter.com/excel-programming/331211-application-interactive%3Dtrue-ignored.html)

John.Greenan

Application.Interactive=true ignored?
 
Has anyone encountered the problem that setting Application.interactive =
true does not always set the property equal to true?

I have a piece of code that responds to a button click and basically
switches excel to non-interactive at the top - like so

9280 With Application
9290 .ScreenUpdating = False
9300 .Interactive = False
9310 .DisplayAlerts = False
9320 .StatusBar = vbNullString
9330 End With

then runs through a series of operations to create a new workbook and copy
sheets into that workbook, create some equations and then
run this code
270 With Application
280 .CalculateFullRebuild
290 .Calculation = xlCalculationAutomatic
300 .ScreenUpdating = True
310 .DisplayAlerts = True
320 .Interactive = True
330 .Cursor = xlDefault
340 End With

the code then exits and returns to user control

However, I can run this and yet see that the interactive property is
remaining as false. I can see this within VBA, but of course I cannot do
anythnig within Excel as the user interface is locked up.

I am running this on a Windows XP pro box with excel 2002.

Any ideas?

Thanks in advance
--
www.alignment-systems.com

William Benson

Application.Interactive=true ignored?
 
John,

I take it you are gaging from the immediate window that the property is
still false. Have you put a break on, and checked the value of error$ both
before and after? Maybe you have an "on error resume next" somewhere masking
an error when you try to set the property?

Just a WAG.

Bill

"John.Greenan" wrote in message
...
Has anyone encountered the problem that setting Application.interactive =
true does not always set the property equal to true?

I have a piece of code that responds to a button click and basically
switches excel to non-interactive at the top - like so

9280 With Application
9290 .ScreenUpdating = False
9300 .Interactive = False
9310 .DisplayAlerts = False
9320 .StatusBar = vbNullString
9330 End With

then runs through a series of operations to create a new workbook and copy
sheets into that workbook, create some equations and then
run this code
270 With Application
280 .CalculateFullRebuild
290 .Calculation = xlCalculationAutomatic
300 .ScreenUpdating = True
310 .DisplayAlerts = True
320 .Interactive = True
330 .Cursor = xlDefault
340 End With

the code then exits and returns to user control

However, I can run this and yet see that the interactive property is
remaining as false. I can see this within VBA, but of course I cannot do
anythnig within Excel as the user interface is locked up.

I am running this on a Windows XP pro box with excel 2002.

Any ideas?

Thanks in advance
--
www.alignment-systems.com





All times are GMT +1. The time now is 01:42 AM.

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