Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Avoid Window Message while deleting a sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Avoid Window Message while deleting a sheet

Try,

Application.DisplayAlerts=False


Corey....

"maperalia" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Avoid Window Message while deleting a sheet

Corey;
Thanks very much. It is just want I need.

Maperalia

"Corey" wrote:

Try,

Application.DisplayAlerts=False


Corey....

"maperalia" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Avoid Window Message while deleting a sheet

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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Avoid Window Message while deleting a sheet

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
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
Deleting Sheet Message Lucia Excel Programming 1 March 13th 07 10:42 PM
how can i avoid an error message while printing an excel sheet solidad Excel Discussion (Misc queries) 1 August 13th 06 01:00 PM
How to avoid deleting of rows 2foot Excel Programming 2 June 5th 06 09:57 AM
How do you avoid window that prompts to enable auto query refresh Peter_EZEM Excel Discussion (Misc queries) 3 January 23rd 06 07:17 PM
Deleting Sheet without message box Mr. T[_2_] Excel Programming 2 January 11th 04 04:25 PM


All times are GMT +1. The time now is 07:24 PM.

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

About Us

"It's about Microsoft Excel"