Solved

XL97 - Unable to change DisplayAlerts/ScreenUpdating property

Posted on 1998-10-01
3
426 Views
Last Modified: 2012-08-14
I'm trying to disable both DisplayAlerts and ScreenUpdating under XL97.  In both cases I'm using the following syntax :

Application.DisplayAlerts = False

However the value always remains TRUE.  I can modify it via the Immediate window without any problem.

I tried the following example on a clean workbook but the result was the same DisplayAlerts = True.

Private Sub CommandButton1_Click()

    Dim rLocalrange As Range

    Set rLocalrange = Range("A1")
    Application.DisplayAlerts = Not     Application.DisplayAlerts
    rLocalrange.Value = Excel.Application.DisplayAlerts
   
End Sub

I'm using Office97 SR1/ NT4 SP3.  Any ideas what I'm doing wrong?
0
Comment
Question by:JazzMan370
3 Comments
 

Author Comment

by:JazzMan370
ID: 1613863
Edited text of question
0
 
LVL 3

Expert Comment

by:frazer
ID: 1613864
Hi,

As you I am using  Office97 SR1/ NT4 SP3, I have used your code in several workbooks and it works fine , changing at each click.

Bizzare problem!  

If I get any ideas I'll let you know.

Frazer
0
 
LVL 5

Accepted Solution

by:
vboukhar earned 50 total points
ID: 1613865
Try such code:
Sub CommandButton1_Click()
    Cells(1, 1) = Application.DisplayAlerts
    MsgBox Application.DisplayAlerts
    Application.DisplayAlerts = Not Application.DisplayAlerts
    MsgBox Application.DisplayAlerts
    Cells(1, 1) = Application.DisplayAlerts
End Sub
You can see, that it really changes this property, but every time when macros start, Excel reset this Application property to "True". So you have just keep it in mind.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Word 2010 mail merge 3 81
Microsoft 365 versus MicroSoft 2013/2016 8 75
COPY from excel to notepad 3 55
Input Data Using a unique ID from another sheet in Excel 3 45
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Outlook Free & Paid Tools
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question