اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

انا مش عارف ايه المشكله هنا فى كود الادخال

 

انا عامل زرار واحد عاوزه يدخل البيانات فى كل عمود لوحدو يعنى لما اكتب فى الرقم يشوف اول خانه فاضيه فى A ويكتب فيها والمبلغ اول خانه فاضيه فى B ويكتب فيها 

 
 

سنترال.rar

قام بنشر

السلام عليكم

استعمل هذا الكود

Private Sub CommandButton1_Click()

    Dim iRow1 As Long, iRow2 As Long, iRow3 As Long, j1 As Long, j2 As Long, j3 As Long
    Dim t1 As Integer, t2 As Integer, t3 As Integer

With Sheet2
    iRow1 = .Cells(.Rows.Count, 2).End(xlUp).Row + 1
    iRow2 = .Cells(.Rows.Count, 11).End(xlUp).Row + 1
    iRow3 = .Cells(.Rows.Count, 20).End(xlUp).Row + 1

For j1 = 1 To iRow1: For t1 = 2 To 8
    .Cells(iRow1, t1).Value = Me.Controls("TextBox" & t1).Value: .Cells(iRow1, 1).Value = iRow1 - 5
Next: Next
For j2 = 1 To iRow2: For t2 = 10 To 16
    .Cells(iRow2, t2 + 1).Value = Me.Controls("TextBox" & t2).Value: .Cells(iRow2, 10).Value = iRow2 - 5
Next: Next
For j3 = 1 To iRow3: For t3 = 18 To 24
    .Cells(iRow3, t3 + 2).Value = Me.Controls("TextBox" & t3).Value: .Cells(iRow3, 19).Value = iRow3 - 5
Next: Next
End With

End Sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information