G
gregork
Hi,
I want data entered on a user form to be sent to cells on two worksheets.
The following code is what I have for sending data to one worksheet. How
alter the code so data is sent to sheet 1 and sheet 2 ?
Private Sub CommandButton1_Click()
Dim LastRow As Object
Set LastRow = Worksheets("Sheet1").Range("A6000").End(xlUp)
If Me.ComboBox1.Value <> "" And Not IsNull(Me.ComboBox1) And
Me.TextBox1.Value <> "" And Not IsNull(Me.TextBox1) Then
LastRow.Offset(2, 0).Value = ComboBox1.Text
LastRow.Offset(2, 3).Value = TextBox1.Text
End If
End Sub
I want data entered on a user form to be sent to cells on two worksheets.
The following code is what I have for sending data to one worksheet. How
alter the code so data is sent to sheet 1 and sheet 2 ?
Private Sub CommandButton1_Click()
Dim LastRow As Object
Set LastRow = Worksheets("Sheet1").Range("A6000").End(xlUp)
If Me.ComboBox1.Value <> "" And Not IsNull(Me.ComboBox1) And
Me.TextBox1.Value <> "" And Not IsNull(Me.TextBox1) Then
LastRow.Offset(2, 0).Value = ComboBox1.Text
LastRow.Offset(2, 3).Value = TextBox1.Text
End If
End Sub