PC Review


Reply
Thread Tools Rate Thread

Avoid Window Message while deleting a sheet

 
 
=?Utf-8?B?bWFwZXJhbGlh?=
Guest
Posts: n/a
 
      19th Jun 2007
I have problem deleting a sheet from a workbook.

Basically, my file (test.xls) is in read only (selected in attributes) . I
want to deleted a sheet "A" as soon the macro is done. However, every time I
do it I got the following window message:
"DATA MAY EXIST IN THE SHEET(S) SELECTED FOR DELECTION. TO PERMANENTLY
DELETE THE DATA, PRESS DELETE"
How can I add an statement in my program to avoid this windows message. Well
as a I mentioned my file is in read only and I want to delete it without
getting any window message.

Thanks in advance.
Maperalia
 
Reply With Quote
 
 
 
 
Corey
Guest
Posts: n/a
 
      19th Jun 2007
Try,

Application.DisplayAlerts=False


Corey....

"maperalia" <(E-Mail Removed)> wrote in message
news:0518C159-951D-4E0D-9C9C-(E-Mail Removed)...
I have problem deleting a sheet from a workbook.

Basically, my file (test.xls) is in read only (selected in attributes) . I
want to deleted a sheet "A" as soon the macro is done. However, every time I
do it I got the following window message:
"DATA MAY EXIST IN THE SHEET(S) SELECTED FOR DELECTION. TO PERMANENTLY
DELETE THE DATA, PRESS DELETE"
How can I add an statement in my program to avoid this windows message. Well
as a I mentioned my file is in read only and I want to delete it without
getting any window message.

Thanks in advance.
Maperalia


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      19th Jun 2007
Application.displayalerts = false
'code to delete the sheets
application.displayalerts = true

Readonly won't be a bother until/unless you try saving it using the same name.

maperalia wrote:
>
> I have problem deleting a sheet from a workbook.
>
> Basically, my file (test.xls) is in read only (selected in attributes) . I
> want to deleted a sheet "A" as soon the macro is done. However, every time I
> do it I got the following window message:
> "DATA MAY EXIST IN THE SHEET(S) SELECTED FOR DELECTION. TO PERMANENTLY
> DELETE THE DATA, PRESS DELETE"
> How can I add an statement in my program to avoid this windows message. Well
> as a I mentioned my file is in read only and I want to delete it without
> getting any window message.
>
> Thanks in advance.
> Maperalia


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?bWFwZXJhbGlh?=
Guest
Posts: n/a
 
      19th Jun 2007
Corey;
Thanks very much. It is just want I need.

Maperalia

"Corey" wrote:

> Try,
>
> Application.DisplayAlerts=False
>
>
> Corey....
>
> "maperalia" <(E-Mail Removed)> wrote in message
> news:0518C159-951D-4E0D-9C9C-(E-Mail Removed)...
> I have problem deleting a sheet from a workbook.
>
> Basically, my file (test.xls) is in read only (selected in attributes) . I
> want to deleted a sheet "A" as soon the macro is done. However, every time I
> do it I got the following window message:
> "DATA MAY EXIST IN THE SHEET(S) SELECTED FOR DELECTION. TO PERMANENTLY
> DELETE THE DATA, PRESS DELETE"
> How can I add an statement in my program to avoid this windows message. Well
> as a I mentioned my file is in read only and I want to delete it without
> getting any window message.
>
> Thanks in advance.
> Maperalia
>
>
>

 
Reply With Quote
 
=?Utf-8?B?bWFwZXJhbGlh?=
Guest
Posts: n/a
 
      19th Jun 2007
Dave;
Thanks very much. It is just want I need.

Maperalia

"Dave Peterson" wrote:

> Application.displayalerts = false
> 'code to delete the sheets
> application.displayalerts = true
>
> Readonly won't be a bother until/unless you try saving it using the same name.
>
> maperalia wrote:
> >
> > I have problem deleting a sheet from a workbook.
> >
> > Basically, my file (test.xls) is in read only (selected in attributes) . I
> > want to deleted a sheet "A" as soon the macro is done. However, every time I
> > do it I got the following window message:
> > "DATA MAY EXIST IN THE SHEET(S) SELECTED FOR DELECTION. TO PERMANENTLY
> > DELETE THE DATA, PRESS DELETE"
> > How can I add an statement in my program to avoid this windows message. Well
> > as a I mentioned my file is in read only and I want to delete it without
> > getting any window message.
> >
> > Thanks in advance.
> > Maperalia

>
> --
>
> Dave Peterson
>

 
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
avoid message that asks for confirm delete sheet Craig Microsoft Excel Programming 1 11th Sep 2009 01:56 PM
Deleting a message in an open window opens the next message in Inb =?Utf-8?B?U0NhbA==?= Windows Vista Mail 8 1st Jan 2008 05:24 PM
how can i avoid an error message while printing an excel sheet =?Utf-8?B?c29saWRhZA==?= Microsoft Excel Misc 1 13th Aug 2006 01:00 PM
How do I avoid deleting of a message from Incoming after replying? =?Utf-8?B?Q2h1Y2sgS2xhc3M=?= Microsoft Outlook Discussion 5 30th Jan 2006 01:55 AM
avoid the window pop-up confirmation message (overwrite the existing files) Phil Chan Microsoft Access Macros 0 22nd Dec 2003 11:14 PM


Features
 

Advertising
 

Newsgroups
 


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