Hide yesterday sheet.

  • Thread starter Thread starter Anirudh
  • Start date Start date
A

Anirudh

If someone help me on

how to Hide and protect the sheets till yesterday.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top