Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Removing confirmation POP from excel

Hi All

In one of my macro i have provided code for deleting a particular sheet.
In between a pop up appears asking for confirmation for delete or cancel the
sheet.
Is there any way we can remove this prompt?

I tried Application.DisplayAlerts = False. this thing is not proper for this.

Thanks in Advance/
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Removing confirmation POP from excel

Hi Singh,

The following works for me

'==========
Public Sub aTester()
With Application
.DisplayAlerts = False
ActiveSheet.Delete
.DisplayAlerts = False
End With
End Sub
'<<==========


Why do you say:

I tried Application.DisplayAlerts = False. this thing is not proper for
this.



---
Regards.
Norman


"singh" wrote in message
...
Hi All

In one of my macro i have provided code for deleting a particular sheet.
In between a pop up appears asking for confirmation for delete or cancel
the
sheet.
Is there any way we can remove this prompt?

I tried Application.DisplayAlerts = False. this thing is not proper for
this.

Thanks in Advance/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Removing confirmation POP from excel

You want FALSE, not TRU

"singh" wrote:

Hi
Thanks for the reply
Am using
Activeworksheet.Delete
Application.DisplayAlerts = True
I do not need writing the sheet name in the macro.
Still am getting the POP up.


"NateBuckley" wrote:

Hello, I know you said that using the application.DisplayAlerts didn't work
but I tested it and it seems to when deleting a sheet this way.

Application.DisplayAlerts = False
Sheets("SheetName").Delete
Application.DisplayAlerts = True

I'm unsure on any other way to do it, so I apologise if this doesn't help
you out.

"singh" wrote:

Hi All

In one of my macro i have provided code for deleting a particular sheet.
In between a pop up appears asking for confirmation for delete or cancel the
sheet.
Is there any way we can remove this prompt?

I tried Application.DisplayAlerts = False. this thing is not proper for this.

Thanks in Advance/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Removing confirmation POP from excel

Hi Jones

Thanks a bunch
It is working for me too......... Perfect.

"Norman Jones" wrote:

Hi Singh,

The following works for me

'==========
Public Sub aTester()
With Application
.DisplayAlerts = False
ActiveSheet.Delete
.DisplayAlerts = False
End With
End Sub
'<<==========


Why do you say:

I tried Application.DisplayAlerts = False. this thing is not proper for
this.



---
Regards.
Norman


"singh" wrote in message
...
Hi All

In one of my macro i have provided code for deleting a particular sheet.
In between a pop up appears asking for confirmation for delete or cancel
the
sheet.
Is there any way we can remove this prompt?

I tried Application.DisplayAlerts = False. this thing is not proper for
this.

Thanks in Advance/


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Removing confirmation POP from excel

Hi Singh,

It is working for me too......... Perfect.


Actually, there is a potentially significant typo!

The second instance of

.DisplayAlerts = False


should reinstate alerts.

Therefore, replace the code with:

'==========
Public Sub aTester()
With Application
.DisplayAlerts = False
ActiveSheet.Delete
.DisplayAlerts = True '<<=======
End With
End Sub
'<<==========

Normally, Excel will automatically reset
the property to true when the code finishes,
but there could be repercussions with cross
processing code.

Apologies for the typo!


---
Regards.
Norman
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
Removing confirmation POP from excel Joel Excel Programming 0 May 1st 08 08:08 AM
Removing confirmation POP from excel NateBuckley Excel Programming 1 May 1st 08 08:08 AM
Removing confirmation POP from excel singh Excel Programming 0 May 1st 08 08:08 AM
Confirmation box alex1982[_4_] Excel Programming 6 August 15th 06 02:23 PM
Saving an Excel worksheet without getting the confirmation box Mike Excel Programming 1 January 13th 04 04:07 PM


All times are GMT +1. The time now is 01:40 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"