PeterMC
07-03-2015, 08:08 PM
Hi,
I have to send up to 4 rows of data to a worksheet, from a userform. Each one should have an incrementing id number. I would like to return those id numbers, to the form, to be sent to another worksheet.
Can anyone advice please
If Not Me.TextBox16 = "" And Not Me.TextBox17 = "" And Not Me.TextBox25 = "" Then
MsgBox Send details to sheet2 for 1"' 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "1 is blank"
End If
If Not Me.TextBox19 = "" And Not Me.TextBox20 = "" And Not Me.TextBox28 = "" Then
MsgBox " Send details to sheet2 for 2" 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "2 is blank"
End If
If Not Me.TextBox22 = "" And Not Me.TextBox23 = "" And Not Me.TextBox30 = "" Then
MsgBox " Send details to sheet2 for 3" 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "3 is blank"
End If
If Not Me.TextBox32 = "" And Not Me.TextBox33 = "" And Not Me.TextBox34 = "" Then
MsgBox " Send details to sheet2 for 4" 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "4 is blank"
End If
I have to send up to 4 rows of data to a worksheet, from a userform. Each one should have an incrementing id number. I would like to return those id numbers, to the form, to be sent to another worksheet.
Can anyone advice please
If Not Me.TextBox16 = "" And Not Me.TextBox17 = "" And Not Me.TextBox25 = "" Then
MsgBox Send details to sheet2 for 1"' 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "1 is blank"
End If
If Not Me.TextBox19 = "" And Not Me.TextBox20 = "" And Not Me.TextBox28 = "" Then
MsgBox " Send details to sheet2 for 2" 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "2 is blank"
End If
If Not Me.TextBox22 = "" And Not Me.TextBox23 = "" And Not Me.TextBox30 = "" Then
MsgBox " Send details to sheet2 for 3" 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "3 is blank"
End If
If Not Me.TextBox32 = "" And Not Me.TextBox33 = "" And Not Me.TextBox34 = "" Then
MsgBox " Send details to sheet2 for 4" 'This will add a new row on sheet2 and make a new id number. If this is sent, get the id number.
Else
MsgBox "4 is blank"
End If