Private Sub CommandButton1_Click()
Dim x As String
x = TextBox1.Value
If x <> "0915532" Then
MsgBox "Invalid Password"
ThisWorkbook.Save
Application.Quit
Application.DisplayAlerts = False
Exit Sub
End If
Dim C As Integer
For C = 0 To 500
Me.Height = 500 - C - 150
Me.Width = 500 - C
Next
End
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then
Cancel = True
MsgBox "Enter Password", vbCritical
End If
End Sub
Private Sub UserForm_Activate()
Me.Top = 50
Me.Left = 50
Dim C As Integer
For C = 0 To 500
Me.Height = C - 150
Me.Width = C
Next
End Sub
sava and quit...
ما را در سایت sava and quit دنبال می کنید
برچسب : نویسنده : parsargham بازدید : 60 تاريخ : پنجشنبه 9 اسفند 1397 ساعت: 0:22