Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

XL97 - Unable to change DisplayAlerts/ScreenUpdating property

Posted on 1998-10-01
3
Medium Priority
?
446 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 100 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
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 make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

721 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