Private Sub CommandButton1_Click()
Sheets("ramfish").Unprotect Password:=""
RowNumber = TextBox1.Value
If TextBox1.Value = "" Then
MsgBox "ÔãÇÑå ÓØÑãÔÎÕ äíÓÊ"
Sheets("ramfish").Protect Password:=""
Exit Sub
End If
If TextBox1.Value < 4 Then
MsgBox "ÔãÇÑå ÓØÑÈÇíÏÇÒ3 ÈÒÑx90ÊÑÈÇÔÏ"
Sheets("ramfish").Protect Password:=""
Exit Sub
End If
If Not (IsNumeric(RowNumber)) Then
MsgBox "áØÝÇ ÔãÇÑå ÓØÑ ÑÇ ÚÏÏ æÇÑÏ äãÇííÏ"
Sheets("ramfish").Protect Password:=""
Exit Sub
End If
Rows(RowNumber).Select
answer = MsgBox("ÂíÇ ÓØÑ ÇäÊÎÇÈ ÔÏå" & TextBox1.Value & " " & "ÍÐÝ ÔæÏ¿ ÈÚÏÇÒÍÐÝ ÞÇÈá ÈÑx90ÔÊ äãí ÈÇÔÏ", vbYesNo + vbInformation, "Delete?")
If answer = vbYes Then
Rows(RowNumber).Delete
Range("a2").Select
Else
Range("a2").Select
End If
End
End Sub
Private Sub CommandButton2_Click()
Sheets("ramfish").Protect Password:=""
Range("a2").Select
End
End Sub
برچسب:
نویسنده: زهرا فلاح