PC Review


Reply
Thread Tools Rate Thread

Application.EnableEvents = False not working

 
 
modo8
Guest
Posts: n/a
 
      27th Jun 2009

Hello-

I have some macro language that deletes a sheet which will always have data
on it. I don't want to have to confirm the popup message "Data may
exist...", so I put in the Application.EnableEvents = False language. Thing
is, the prompt still comes up! Any ideas? I'm using Excel 2002 if that
makes a difference. Language below. Thanks a bunch!

Windows(FileName).Activate
Sheets(DeleteSheet).Select
Application.EnableEvents = False
ActiveWindow.SelectedSheets.Delete
Application.EnableEvents = True
 
Reply With Quote
 
 
 
 
Otto Moehrbach
Guest
Posts: n/a
 
      27th Jun 2009

You want:
Application.DisplayAlerts = False
HTH Otto
"modo8" <(E-Mail Removed)> wrote in message
news:C5DBF384-DD5A-4A07-96BE-(E-Mail Removed)...
> Hello-
>
> I have some macro language that deletes a sheet which will always have
> data
> on it. I don't want to have to confirm the popup message "Data may
> exist...", so I put in the Application.EnableEvents = False language.
> Thing
> is, the prompt still comes up! Any ideas? I'm using Excel 2002 if that
> makes a difference. Language below. Thanks a bunch!
>
> Windows(FileName).Activate
> Sheets(DeleteSheet).Select
> Application.EnableEvents = False
> ActiveWindow.SelectedSheets.Delete
> Application.EnableEvents = True



 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      27th Jun 2009

I think you want

Application.DisplayAlerts = False

'The code

Application.DisplayAlerts = True



"modo8" <(E-Mail Removed)> wrote in message
news:C5DBF384-DD5A-4A07-96BE-(E-Mail Removed)...
> Hello-
>
> I have some macro language that deletes a sheet which will always have
> data
> on it. I don't want to have to confirm the popup message "Data may
> exist...", so I put in the Application.EnableEvents = False language.
> Thing
> is, the prompt still comes up! Any ideas? I'm using Excel 2002 if that
> makes a difference. Language below. Thanks a bunch!
>
> Windows(FileName).Activate
> Sheets(DeleteSheet).Select
> Application.EnableEvents = False
> ActiveWindow.SelectedSheets.Delete
> Application.EnableEvents = True



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
EnableEvents = False not working ??? B Lynn B Microsoft Excel Programming 4 22nd Apr 2010 05:28 PM
Application.enableevents = false not working in workbook open even oli merge Microsoft Excel Programming 5 4th Feb 2010 04:39 PM
preventing Application.EnableEvents = False x taol Microsoft Excel Programming 1 29th Mar 2006 11:12 AM
Application.EnableEvents = False not working Paul Martin Microsoft Excel Programming 3 10th May 2005 05:06 AM
Problems with BeforeSave and Application.EnableEvents = False Sanne Microsoft Excel Programming 3 11th Feb 2005 12:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:51 AM.