Private Sub Worksheet_Activate( )If Application.InputBox(″请输入操作权限密码:″) = 123 ThenRange(″A1″).SelectSheets (″机密文档″).Cells.Font.ColorIndex = 56Else MsgBox ″密码错误,即将退出!″ Sheets(″普通文档″).Select End If End Sub Private Sub Worksheet_Deactivate( ) Sheets(″机密文档″).Cells.Font.ColorIndex = 2 End Sub