[程序设计]关于给excel加密的程序代码
印刷厂直印●彩页1000张只需要69元●名片5元每盒-更多报价➦联系电话:138-1621-1622(微信同号)
Private Sub Worksheet_Activate()
If Application.InputBox(“ 请输入操作权限密码 “) = 123 Then
Range(″A1″).Select
sheets(″机密文档″).Cells.Font.ColorIndex = 56
Else
MsgBox ″密码错误, 即将退出!″
sheets(″普通文档″).Select
End If
End Sub
Private Sub Worksheet_Deactivate()
sheets(″机密文档″).Cells.Font.ColorIndex = 2
End Sub
我想用这段话给excel加密,可是在工具-宏-vb编辑器中添加代码运行后总出现运行错误“9“下标出界或别的错误,请帮忙看一下,哪里出了错.