Home » excel » excel – Application.Interactive = True fails

excel – Application.Interactive = True fails

Posted by: admin April 23, 2020 Leave a comment

Questions:

In the worksheet SelectionChange event I set :

Application.Interactive = False
.... do work
Application.Interactive = True

For some reason Interactive is not getting set back to true, even though I know the code is being executed.

Excel 2013

Any ideas?

How to&Answers:
Sub Main()

    Debug.Print Application.Interactive
    Application.Interactive = False
    Debug.Print Application.Interactive
    Application.Interactive = True
    Debug.Print Application.Interactive

End Sub

Doesn’t fail for me… Try that and see more here

Since you’ve discovered the reason for failing the conclusion could be that the Application.Volatile needs to be set to false on a function that uses it because the Interactive mode blocks the user interface and the Volatile calculates things based on user input. While the user input is blocked you can’t expect a function that evaluates the user input to work. One excludes the other – hope that makes sense.

Additionally, check your on error resume next or on error goto <label> statements as the would cause skipping some of the code therefore the Application.Interactive = True would have never get executed.