Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dont want the deletion option


When running the code I am given the option to delete, I dont require
this,
many thks

Sub reb()

Dim wks As Worksheet
Dim wkb As Workbook

For Each wks In ThisWorkbook.Worksheets
If wks.Name = "taz" Then
wks.Delete
End If
Next


End Sub


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=564422

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Dont want the deletion option

Application.DisplayAlerts = False
wks.Delete
Application.DisplayAlerts = True

But without a loop you can use this

On Error Resume Next
Application.DisplayAlerts = False
Sheets("taz").Delete
Application.DisplayAlerts = True
On Error GoTo 0

--
Regards Ron de Bruin
http://www.rondebruin.nl



"T De Villiers" wrote in message
news:T.De.Villiers.2bgqxv_1153767309.8944@excelfor um-nospam.com...

When running the code I am given the option to delete, I dont require
this,
many thks

Sub reb()

Dim wks As Worksheet
Dim wkb As Workbook

For Each wks In ThisWorkbook.Worksheets
If wks.Name = "taz" Then
wks.Delete
End If
Next


End Sub


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=564422



  #3   Report Post  
Posted to microsoft.public.excel.programming
ADG ADG is offline
external usenet poster
 
Posts: 76
Default Dont want the deletion option

Hi

Before Wks.delete add

Application.DisplayAlerts = False

then after add

Application.DisplayAlerts = True

Regards
--
Tony Green


"T De Villiers" wrote:


When running the code I am given the option to delete, I dont require
this,
many thks

Sub reb()

Dim wks As Worksheet
Dim wkb As Workbook

For Each wks In ThisWorkbook.Worksheets
If wks.Name = "taz" Then
wks.Delete
End If
Next


End Sub


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=564422


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dont want the deletion option


Thanks Ron, works a treat


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=564422

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
Dont have secondary axis option listed in Series Option Venus Charts and Charting in Excel 3 February 23rd 10 07:30 PM
preserve formatting option in pivot table option dialog box Dave F Excel Discussion (Misc queries) 4 May 8th 08 07:25 PM
deletion of option buttons gvm Excel Worksheet Functions 2 March 6th 06 12:56 AM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
Option Commands (Option Explicit / Option Base etc) - Scope Alan Excel Programming 8 November 1st 04 02:22 AM


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