Solved

XL97 - Unable to change DisplayAlerts/ScreenUpdating property

Posted on 1998-10-01
3
438 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

628 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