Hi All,
I require a few help for an attendance chart which I'm trying to mod as attached.
1. I need to hide the sheet 1 (Time Log) and only be able to view/edit with a password. I have this VBA code and pasted it into the worksheet but am facing a debug error. Can anybody see where I've went wrong. I've removed the code from the workbook and pasted it here.
The password is currently set to code1
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim MySheets As String, Response As String
MySheet = "Sheet1"
If ActiveSheet.Name = MySheet Then
ActiveSheet.Visible = False
Response = InputBox("Enter password to view sheet")
If Response = "code1" Then
Sheets(MySheet).Visible = True
Application.EnableEvents = False
Sheets(MySheet).Select
Application.EnableEvents = True
End If
End If
Sheets(MySheet).Visible = True
End Sub
2. I would like to insert a user/ date time stamp on sheet 3 (scan) in the date columns. when an input is keyed in column b (Scan in) user/ date time stamp is created.
Any assistance will be greatly appreciated.
Bookmarks