Hi
I have Day wise sheets in excel file & Today's date prior all sheets are automatic protect through macro but still few users are updating prior dates sheets i thing when excel file open that time show enable editing option before click in to that sheets are not protect after click on that then protect can any one tell me how to avoid this thing i want when any user can open file that time all prior dates sheets are protect & hide through vba like this
I have Day wise sheets in excel file & Today's date prior all sheets are automatic protect through macro but still few users are updating prior dates sheets i thing when excel file open that time show enable editing option before click in to that sheets are not protect after click on that then protect can any one tell me how to avoid this thing i want when any user can open file that time all prior dates sheets are protect & hide through vba like this
Code:
Sub HideSheet()
Dim sheet As Worksheet
Set sheet = ActiveSheet
' this hides the sheet but users will be able
' to unhide it using the Excel UI
sheet.Visible = xlSheetHidden
' this hides the sheet so that it can only be made visible using VBA
sheet.Visible = xlSheetVeryHidden
End Sub