Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sPassCheck As String
Dim rng As Range
Dim sTemp As String
Dim sPassword As String
sPassword = "123"
sTemp = "براي حذف اطلاعات بايد رمز ورود را وارد کنيد"
If Target.Count > 1 Then
Set rng = Target.Cells(1, 1)
Else
Set rng = Target
End If
If rng.Value = "" Then
sPassCheck = InputBox(sTemp, "کنترل دسترسي")
Application.EnableEvents = False
If sPassCheck <> sPassword Then Application.Undo
End If
Application.EnableEvents = True
End Sub
0 نظر
تازه ترین ها