ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   deleting sheet protection (https://www.excelbanter.com/excel-programming/317703-deleting-sheet-protection.html)

VK

deleting sheet protection
 
Hi people!

I want prevent of deleteing sheets I originally have.
I have a Macro who add a new sheet, which must be deleteable.
OK. I know how to protect whole Workbook, but it's not what I need ,because
I can't add new worksheet. (delete too)



Any help!

Vlado





VK

deleting sheet protection
 
Another thing:

New sheets from macro are colored:
..........ActiveWorkbook.ActiveSheet.Tab.ColorInde x = 34
Maybe is possible to disable Delete< in relation of tab color.
Something like.

If ActiveSheet.Tab.ColorIndex < 34 then disable Delete

Is that possible?





Tom Ogilvy

deleting sheet protection
 
In you code,
unprotect the workbook, add the sheet, reprotect the workbook.

--
Regards,
Tom Ogilvy

"VK" wrote in message
...
Hi people!

I want prevent of deleteing sheets I originally have.
I have a Macro who add a new sheet, which must be deleteable.
OK. I know how to protect whole Workbook, but it's not what I need

,because
I can't add new worksheet. (delete too)



Any help!

Vlado







VK

deleting sheet protection
 
Tom,

This would be good option but, problem is this new sheets must be daleteable
for user.
I don't know how manage that.






Tom Ogilvy

deleting sheet protection
 
Provide an interface for the user, such as a menu item or command button
that executes your code that deletes the sheet.

--
Regards,
Tom Ogilvy

"VK" wrote in message
...
Tom,

This would be good option but, problem is this new sheets must be

daleteable
for user.
I don't know how manage that.









All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com