YuriyRR

Full Member | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Private Sub CommandButton1_Click() Dim i As Integer Dim R As Range For i = 4 To 100 Step 1 Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i) If R.Value = Empty Then R.Value = TextBox3.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 1) R.Value = TextBox4.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 2) R.Value = TextBox5.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 3) R.Value = TextBox6.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 4) R.Value = TextBox7.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 5) R.Value = TextBox8.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 6) R.Value = TextBox9.Text Set R = Worksheets("Январь").Cells(ComboBox1.ListIndex + 2, i + 7) R.Value = TextBox10.Text Exit For End If Next i End Sub Private Sub UserForm_Initialize() ComboBox1.RowSource = "$A$2:$A$6" ComboBox2.List = Application.Range("Наименование!B1:B12").Value ComboBox3.List = Application.Range("Наименование!C1:C12").Value End Sub В первом комбобоксе выбираем строку, кнопкой заполняем |