انا بطلب منكم طلب بسيط انا باستخدم الكود التالي
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("aa")
'find first empty row in database
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
'check iteam
If Trim(Me.TextBox1.Value) = "" Then
Me.TextBox1.SetFocus
MsgBox "ÃÏÎá ÑÞã Úáã ÇáÇÓÊáÇã"
Exit Sub
End If
If Trim(Me.TextBox2.Value) = "" Then
Me.TextBox2.SetFocus
MsgBox "ÃÏÎá ÔåÑ ÇáØÈÇÚå"
Exit Sub
End If
If Trim(Me.TextBox3.Value) = "" Then
Me.TextBox3.SetFocus
MsgBox "ÃÏÎá ãÊæÓØ ÇáÈÇáå"
Exit Sub
End If
If Trim(Me.TextBox4.Value) = "" Then
Me.TextBox4.SetFocus
MsgBox "ÃÏÎá ßãíÉ ÇáÎØ ÇáÇæá"
Exit Sub
End If
'copy the data to the database
ws.Cells(iRow, 1).Value = Me.TextBox1.Value
ws.Cells(iRow, 2).Value = Me.TextBox2.Value
ws.Cells(iRow, 3).Value = Me.TextBox3.Value
ws.Cells(iRow, 4).Value = Me.TextBox4.Value
'clear the data
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox1.SetFocus
بس المشكله انه بيسجل بداية من الصف الثاني
انا عاوزه يسجل بداية من الصف ال 11
ياريت حد يقولي تعديل الكود علشان انا دوخت
وشكرا لكم اخواتي