запись данных по Column, UserForm на VBA
Private Sub CommandButton1_Click()
If IsNumeric(Label1.Caption) = True Then
Label1.Caption = Label1.Caption + 1
Else
Label1.Caption = 1
End If
Rem
Sheets("Kat1").Activate
If TextBox2.Text = "" And TextBox7.Text = "" Then
UserForm2.Show
ElseIf ComboBox1.Text = "Robert" Then
NextRow = Application.WorksheetFunction.CountA(Range("C:C")) + 2
Cells(NextRow, 3) = TextBox2.Text
Cells(NextRow, 4) = TextBox3.Text
Cells(NextRow, 5) = TextBox4.Text
Cells(NextRow, 6) = TextBox5.Text
Cells(NextRow, 7) = ComboBox2.Text
Cells(NextRow, 9) = TextBox7.Text
'...............и тд.
TextBox3.Text = "²"
TextBox6.Text = "²"
End If
End Sub
Private Sub CommandButton2_Click()
Form.Hide
End Sub
Private Sub UserForm_Initialize()
ComboBox2.RowSource = "Kat1!B5:B54"
Me.ComboBox1.AddItem "Robert"
Me.ComboBox1.AddItem "Garibyan Armen"
Me.ComboBox1.ListIndex = 0
End Sub
Срочно если можно ПЛИЗ