اخي حاتم
استبدل الكود التالي
Private Sub CommandButton2_Click()
KH_A
End Sub
بالكود التالي
Private Sub CommandButton2_Click()
KH_A
TextBox2.Value = Application.WorksheetFunction.Text(Now(), "yyyy/mm/dd")
End Sub
وكذلك قم بتعديل هذا الكود (زر التعديل)
Private Sub CommandButton1_Click()
Dim R As Integer, N As Integer, Endrow As Integer
For R = 0 To 10
If Me.Controls(myCon(R)).Text = "" Then N = N + 1
Next
Me.MousePointer = 11
With Sheets("info")
Endrow = .Range("A" & .Rows.Count).End(xlUp).Row + 1
For R = 0 To 10
.Cells(Endrow, R + 1).Value = Me.Controls(myCon(R)).Value
Next R
End With
KH_A
ActiveWorkbook.Save
Me.MousePointer = 0
MsgBox "تمت الأضافة بنجاح"
1 End Sub
ليصبح
Private Sub CommandButton1_Click()
Dim R As Integer, N As Integer, Endrow As Integer
For R = 0 To 10
If Me.Controls(myCon(R)).Text = "" Then N = N + 1
Next
Me.MousePointer = 11
With Sheets("info")
Endrow = .Range("A" & .Rows.Count).End(xlUp).Row + 1
For R = 0 To 10
.Cells(Endrow, R + 1).Value = Me.Controls(myCon(R)).Value
Next R
End With
KH_A
ActiveWorkbook.Save
Me.MousePointer = 0
MsgBox "تمت الأضافة بنجاح"
TextBox2.Value = Application.WorksheetFunction.Text(Now(), "yyyy/mm/dd")
1 End Sub
والله اعلم
ابواحمد