Private Sub Worksheet_Activate()
Sheets("sheet2").Cells.Interior.ColorIndex = 2
Sheets("sheet2").Cells.Font.ColorIndex = 2
If Application.InputBox("請輸入密碼:") = 123 Then
Range("A1").Select
ActiveSheet.Cells.Font.ColorIndex = 56
Else
MsgBox "輸入錯誤,請從新選擇!!"
Sheets("總表").Select
End If
End Sub