Dim pwd As String
If InputPassWord(pwd,"提示","请输入密码:") Then
If pwd = "515151" Then
Tables("表A").AllowEdit = True 这个位置是打开窗口
End If