Solved

XL97 - Unable to change DisplayAlerts/ScreenUpdating property

Posted on 1998-10-01
3
419 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
Comment Utility
Edited text of question
0
 
LVL 3

Expert Comment

by:frazer
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you ever had the experience that you had to follow 10 steps over and over again every time when you need to nicely forward an important email to your manager? Fear no more! With the help of the Quick Steps feature in Outlook 2010, your old chor…
Introduction It seems that at least a couple of times per month, I answer a question that requires automating Outlook from another Microsoft Office application, usually (although not always) to send one or more email messages.  For example: …
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now