كود ادخال البيانات
Dim LRow As Long
Dim ws As Worksheet
Set ws = Worksheets("ÇáÓÌá")
LRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
If Trim(Me.TxtBox1.Value) = "" Then
Me.TxtBox1.SetFocus
MsgBox ("ãä ÝÖáß ÃÏÎá ÇáßæÏ")
Exit Sub
End If
If Trim(Me.TxtBox2.Value) = "" Then
Me.TxtBox2.SetFocus
MsgBox ("ãä ÝÖáß ÃÏÎá ÇáÇÓã")
Exit Sub
End If
ws.Cells(LRow, 1).Value = Me.TxtBox1.Value
ws.Cells(LRow, 2).Value = Me.TxtBox2.Value
ws.Cells(LRow, 3).Value = Me.TxtBox3.Value
ws.Cells(LRow, 4).Value = Me.TxtBox4.Value
ws.Cells(LRow, 5).Value = Me.TxtBox5.Value
ws.Cells(LRow, 6).Value = Me.TxtBox6.Value
ws.Cells(LRow, 7).Value = Me.TxtBox7.Value
ws.Cells(LRow, 8).Value = Me.TxtBox8.Value
ws.Cells(LRow, 9).Value = Me.TextBox1.Value
ws.Cells(LRow, 10).Value = Me.TextBox2.Value
Me.TxtBox1.Value = ""
Me.TxtBox2.Value = ""
Me.TxtBox3.Value = ""
Me.TxtBox4.Value = ""
Me.TxtBox5.Value = ""
Me.TxtBox6.Value = ""
Me.TxtBox7.Value = ""
Me.TxtBox8.Value = ""
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TxtBox1.SetFocus