nnsea 发表于 2023-10-26 22:22:59

给工作表加密VBA


Private Sub Worksheet_Activate() '激活工作表触发的程序
a = InputBox("请输入密码")
If a = 123 Then
    Cells.Font.Color = RGB(0, 0, 0)
    Application.EnableEvents = False
Else
    Sheet3.Activate
End If
End Sub
页: [1]
查看完整版本: 给工作表加密VBA