View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
modo8 modo8 is offline
external usenet poster
 
Posts: 6
Default Application.EnableEvents = False not working


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