Solved

XL97 - Unable to change DisplayAlerts/ScreenUpdating property

Posted on 1998-10-01
3
431 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
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 …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

807 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