Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Can't Set DisplayAlerts to False

Windows XP, Excel 2003

After booting up, I put the following code in a module.

Sub A()

Application.DisplayAlerts = False
Stop

End Sub

When the macro stops at the Stop statement, I type
?Application.DisplayAlerts in the immediate window and get the answer
"True". It happens every time. I can't ever set DisplayAlerts to False in
any macro at any time.

Any ideas on what is wrong?

Thank you.

Mark



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Can't Set DisplayAlerts to False

Mark

try it like this:

Sub A()

Application.DisplayAlerts = False
MsgBox Application.DisplayAlerts
Application.DisplayAlerts = True
Stop

End Sub

Regards

Trevor


"Mark Driscol" wrote in message
...
Windows XP, Excel 2003

After booting up, I put the following code in a module.

Sub A()

Application.DisplayAlerts = False
Stop

End Sub

When the macro stops at the Stop statement, I type
?Application.DisplayAlerts in the immediate window and get the answer
"True". It happens every time. I can't ever set DisplayAlerts to False

in
any macro at any time.

Any ideas on what is wrong?

Thank you.

Mark





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Can't Set DisplayAlerts to False

This is because the displayalerts resets when the code finishes.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mark Driscol" wrote in message
...
Windows XP, Excel 2003

After booting up, I put the following code in a module.

Sub A()

Application.DisplayAlerts = False
Stop

End Sub

When the macro stops at the Stop statement, I type
?Application.DisplayAlerts in the immediate window and get the answer
"True". It happens every time. I can't ever set DisplayAlerts to False

in
any macro at any time.

Any ideas on what is wrong?

Thank you.

Mark





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DisplayAlerts and ScreenUpdate will not set to False Joe at Baso New Users to Excel 1 April 5th 05 07:41 PM
Application::DisplayAlerts not working Howard Dierking Excel Programming 2 February 11th 04 12:04 PM
application.displayalerts Erin[_5_] Excel Programming 1 December 4th 03 03:49 PM
DisplayAlerts property is not changing to False myoung Excel Programming 1 November 19th 03 04:48 PM
EnableEvents and DisplayAlerts problems Derek Gadd Excel Programming 3 November 4th 03 01:35 PM


All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"