دوستان یوزرفرمی تعریف کردم که باید 28 ردیف اطلاعات را در شیت ذخیره کند
آیا امکان داره که از حلقه تکرار برای ثبت اطلاعات یوزرفرم استفاده کنم؟
Dim last_row
last_row = Sheets("dita").Range("a1048000").End(xlUp).Row + 1
If ComboBox81.Text <> "" Then
Sheets("dita").Cells(last_row, TextBox231) = TextBox149.Text
Sheets("dita").Cells(last_row, TextBox231 + 1) = ComboBox81.Text
Sheets("dita").Cells(last_row, 3) = TextBox146.Text
Sheets("dita").Cells(last_row, 4) = ComboBox21.Text
Sheets("dita").Cells(last_row, 7) = ComboBox6.Text
Sheets("dita").Cells(last_row, 8) = TextBox4.Text
Sheets("dita").Cells(last_row, 9) = TextBox21.Text
Sheets("dita").Cells(last_row, 10) = TextBox41.Text
Sheets("dita").Cells(last_row, 11) = TextBox61.Text
Sheets("dita").Cells(last_row, 12) = TextBox81.Text
Sheets("dita").Cells(last_row, 13) = ComboBox107.Text
Sheets("dita").Cells(last_row, 14) = ComboBox67.Text
Sheets("dita").Cells(last_row, 15) = TextBox301.Text
Else
End If
If ComboBox81.Text <> "" And TextBox231.Value = 5 Then
Sheets("dita").Cells(last_row, TextBox231 - 4) = TextBox271.Text
Sheets("dita").Cells(last_row, TextBox231 - 3) = ComboBox41.Text
Else
End If
last_row = Sheets("dita").Range("a1048000").End(xlUp).Row + 1
If ComboBox82.Text <> "" Then
Sheets("dita").Cells(last_row, TextBox232) = TextBox152.Text
Sheets("dita").Cells(last_row, TextBox232 + 1) = ComboBox82.Text
Sheets("dita").Cells(last_row, 3) = TextBox146.Text
Sheets("dita").Cells(last_row, 4) = ComboBox22.Text
Sheets("dita").Cells(last_row, 7) = ComboBox7.Text
Sheets("dita").Cells(last_row, 8) = TextBox4.Text
Sheets("dita").Cells(last_row, 9) = TextBox22.Text
Sheets("dita").Cells(last_row, 10) = TextBox42.Text
Sheets("dita").Cells(last_row, 11) = TextBox62.Text
Sheets("dita").Cells(last_row, 12) = TextBox82.Text
Sheets("dita").Cells(last_row, 13) = ComboBox108.Text
Sheets("dita").Cells(last_row, 14) = ComboBox67.Text
Sheets("dita").Cells(last_row, 15) = TextBox302.Text
Else
End If





کامنت