لاثراء الموضوع وبعد اذن اساتذتى الافاضل المشاركين
ترقيم تلقائى بالكود
Dim x As Integer
Private Sub CommandButton1_Click()
Cells(6, 1) = 1
For i = 7 To 20
If Cells(i, 1) = "" And Cells(i, 2) = "" Then
Exit Sub
Else
Cells(i, 1) = i - 2
End If
Next i
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 6 Then
MsgBox ("áä íÈÏÇ ÇáÊÑÞíã ãä åäÇ")
Cells(6, 1) = 1
Exit Sub
ElseIf Target.Row = 6 Then
Cells(Target.Row, 1) = 1
Else
Cells(Target.Row, 1) = Cells((Target.Row) - 1, 1) + 1
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
مرفق ملف به التطبيق