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

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

قام بنشر

لو سمحتوا اختصار هذا الكود الطويل لنسخ البيانات الي نموذج للطباعة في العمود C 

Sheet5.Range("C1").Value = UserForm1.TextBox2.Value
Sheet5.Range("C2").Value = UserForm1.TextBox3.Value
Sheet5.Range("C3").Value = UserForm1.TextBox4.Value
Sheet5.Range("C4").Value = UserForm1.TextBox5.Value
Sheet5.Range("C5").Value = UserForm1.TextBox6.Value
Sheet5.Range("C6").Value = UserForm1.TextBox7.Value
Sheet5.Range("C7").Value = UserForm1.TextBox8.Value
Sheet5.Range("C8").Value = UserForm1.TextBox9.Value
Sheet5.Range("C9").Value = UserForm1.TextBox10.Value
Sheet5.Range("C10").Value = UserForm1.TextBox11.Value
Sheet5.Range("C11").Value = UserForm1.TextBox12.Value
Sheet5.Range("C12").Value = UserForm1.TextBox13.Value
Sheet5.Range("C13").Value = UserForm1.TextBox14.Value
Sheet5.Range("C14").Value = UserForm1.TextBox15.Value
Sheet5.Range("C15").Value = UserForm1.TextBox16.Value
Sheet5.Range("C16").Value = UserForm1.TextBox17.Value
Sheet5.Range("C17").Value = UserForm1.TextBox18.Value
Sheet5.Range("C18").Value = UserForm1.TextBox19.Value
Sheet5.Range("C19").Value = UserForm1.TextBox20.Value
Sheet5.Range("C20").Value = UserForm1.TextBox21.Value
Sheet5.Range("C21").Value = UserForm1.TextBox22.Value
Sheet5.Range("C22").Value = UserForm1.TextBox23.Value
Sheet5.Range("C23").Value = UserForm1.TextBox24.Value
Sheet5.Range("C24").Value = UserForm1.TextBox25.Value
Sheet5.Range("C25").Value = UserForm1.TextBox26.Value
Sheet5.Range("C26").Value = UserForm1.TextBox27.Value
Sheet5.Range("C27").Value = UserForm1.TextBox28.Value
Sheet5.Range("C28").Value = UserForm1.TextBox29.Value
Sheet5.Range("C29").Value = UserForm1.TextBox30.Value
 

  • أفضل إجابة
قام بنشر

وعليكم السلام ورحمة الله تعالى وبركاته 

جرب هدا 

Dim i As Integer
Dim WS As Worksheet: Set WS = Sheet5
    For i = 2 To 30
        WS.Cells(i - 1, 3).Value = Me.Controls("TextBox" & i).Value
    Next i

 

  • Like 2
قام بنشر

شكراً لك الكود ناجح 100%

زادك الله علماً ومعرفة .

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