Hy guys, i am trying to find a way to make this userform to write giving information in two rows
Row One Having
ws.Cells(iRow, 3).Value = Me.textbox_name.Value
ws.Cells(iRow, 4).Value = Me.textbox_name.Value
ws.Cells(iRow, 5).Value = Range("C2").Value
and
Row Two having
ws.Cells(iRow, 4).Value = Me.textbox_name.Value
ws.Cells(iRow, 5).Value = Range("C2").Value
Original code is underneath this line, if you will need any additional information please feel free to ask. Thanks again Chandoo,
------------------------------------------------------------------------------------------
'find first empty row in database
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
'check for a Name number
If Trim(Me.textbox_name.Value) = "" Then
Me.textbox_name.SetFocus
MsgBox "Please complete the form"
Exit Sub
End If
'copy the data to the database
ws.Cells(iRow, 3).Value = Me.textbox_name.Value
ws.Cells(iRow, 4).Value = Me.textbox_name.Value
ws.Cells(iRow, 5).Value = Range("C2").Value
Row One Having
ws.Cells(iRow, 3).Value = Me.textbox_name.Value
ws.Cells(iRow, 4).Value = Me.textbox_name.Value
ws.Cells(iRow, 5).Value = Range("C2").Value
and
Row Two having
ws.Cells(iRow, 4).Value = Me.textbox_name.Value
ws.Cells(iRow, 5).Value = Range("C2").Value
Original code is underneath this line, if you will need any additional information please feel free to ask. Thanks again Chandoo,
------------------------------------------------------------------------------------------
'find first empty row in database
iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
'check for a Name number
If Trim(Me.textbox_name.Value) = "" Then
Me.textbox_name.SetFocus
MsgBox "Please complete the form"
Exit Sub
End If
'copy the data to the database
ws.Cells(iRow, 3).Value = Me.textbox_name.Value
ws.Cells(iRow, 4).Value = Me.textbox_name.Value
ws.Cells(iRow, 5).Value = Range("C2").Value