Hi
column A has a range of values like this
I have a userform with values im adding to a datasheet with this code
Cells(Rows.Count, 1).End(xlUp)(2) = UserForm1.TextBox1.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 1) = UserForm1.TextBox2.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 2) = UserForm1.ComboBox2.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 3) = UserForm1.TextBox4.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 4) = UserForm1.ComboBox3.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 5) = UserForm1.TextBox6.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 6) = UserForm1.TextBox7.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 7) = UserForm1.TextBox8.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 8) = UserForm1.TextBox9.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 9) = UserForm1.ComboBox1.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 10) = UserForm1.TextBox11.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 11) = UserForm1.TextBox12.Text
Textbox 1 contains the row A values
I want when i open the userform to have the next number to be shown in textbox1
Like if lastline in column A is B20220012
The textbox1 should contain B20220013 when userform1.show is executed.
thank you
column A has a range of values like this
B20210188 |
B20210189 |
B20210190 |
B20210191 |
B20210192 |
B20220000 |
B20220001 |
B20220002 |
B20220003 |
B20220004 |
B20220005 |
B20220006 |
B20220007 |
B20220008 |
B20220009 |
B20220010 |
B20220011 |
B20220012 |
I have a userform with values im adding to a datasheet with this code
Cells(Rows.Count, 1).End(xlUp)(2) = UserForm1.TextBox1.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 1) = UserForm1.TextBox2.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 2) = UserForm1.ComboBox2.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 3) = UserForm1.TextBox4.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 4) = UserForm1.ComboBox3.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 5) = UserForm1.TextBox6.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 6) = UserForm1.TextBox7.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 7) = UserForm1.TextBox8.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 8) = UserForm1.TextBox9.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 9) = UserForm1.ComboBox1.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 10) = UserForm1.TextBox11.Text
Cells(Rows.Count, 1).End(xlUp).Offset(0, 11) = UserForm1.TextBox12.Text
Textbox 1 contains the row A values
I want when i open the userform to have the next number to be shown in textbox1
Like if lastline in column A is B20220012
The textbox1 should contain B20220013 when userform1.show is executed.
thank you