Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Disable Macro automatically when a sheet is deleted

Hi,

I have a worksheet that contains 12 worksheets for different users to fill
in. Each user will delete the other 11 worksheets and there will be an error
message.

Is there any way to solve this problem?

Thank you very much.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Disable Macro automatically when a sheet is deleted

Your question is a little vague. You are in the programming group so you
could get code to delete the other sheets by assigning it to a toolbar. the
code below will delete all but the active sheet. (No warning is given

Sub DeleteAllButActive()
Dim wksActive As Worksheet, wks As Worksheet
Set wksActive = ActiveSheet
Application.DisplayAlerts = False
For Each wks In ThisWorkbook.Worksheets
If wks.Name < wksActive.Name Then wks.Delete
Next wks
End Sub



--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"bayhe" wrote in message
...
Hi,

I have a worksheet that contains 12 worksheets for different users to fill
in. Each user will delete the other 11 worksheets and there will be an
error
message.

Is there any way to solve this problem?

Thank you very much.



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
My Posts are automatically getting deleted TGV[_2_] Excel Discussion (Misc queries) 2 August 27th 09 10:06 AM
Macro REQ: Automatically copy a template sheet and rename MCSmarties Excel Worksheet Functions 5 October 11th 07 09:18 PM
disable security warning when macros are deleted Don@Skyline Excel Discussion (Misc queries) 1 April 18th 07 05:36 PM
Formula referencing deleted row (move up automatically) Paulymon Excel Worksheet Functions 1 March 17th 05 08:41 PM
Disable Macro automatically when a sheet is deleted bayhe Excel Programming 1 January 18th 05 09:13 AM


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