ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide yesterday sheet. (https://www.excelbanter.com/excel-programming/406939-hide-yesterday-sheet.html)

Anirudh

Hide yesterday sheet.
 
If someone help me on

how to Hide and protect the sheets till yesterday.

joel

Hide yesterday sheet.
 
You have to tell me how your worksheets are named to give a complete
solution. Here is some code that need to be modified based on the way you
name the worksheets

For Each sht In ThisWorkbook.Sheets
If sht.Name < "Yesterday" And _
sht.Name < "Today" Then

sht.Rows("1:" & Rows.Count).Hidden = True
sht.Protect _
Password:="ABC", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True
End If
Next sht


"Anirudh" wrote:

If someone help me on

how to Hide and protect the sheets till yesterday.



All times are GMT +1. The time now is 10:58 AM.

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