Alright, so I’ve tried to find Something for my exact situation on the internet, but I cannot. So I have an excel workbook that contains approximately 31 tabs (worksheets)—1for each day of the month. I want to either find a way to lock out each worksheet at 0001 the following day and also keep the following says locked until 0001. For example: I would like the 1st of January to be open to edit until 0001 on the 2nd. I would like the 2nd of January to unlock itself at 0001 on the 2nd of January, and so on throughout the month. I am wanting to do this to make sure that data is not entered in the wrong worksheet.
If that won’t work, then I need something that will bring you to the sheet for the day you are accessing it. So if I am opening to workbook on 1 Jan, I want it to automatically bring them to the 1 Jan tab.
There was also an original way I wanted to do this that is a lot more complicated, but would be even better, if someone wants to know more I can tell them! Thank you in advance!
Sub BloqueiaDemaisPlanilhas(data) Dim NomePlan As String Set i = Sheets For Each i In Sheets NomePlan = i.Name If i.Name <> data Then i.Select ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="1234" ActiveSheet.EnableSelection = xlNoSelection
Next End Sub
Segue em anexo o arquivo para você testar. espero ter ajudado!