dss28
Board Regular
- Joined
- Sep 3, 2020
- Messages
- 165
- Office Version
- 2007
- Platform
- Windows
I have a listbox which is filled with data transferred from textboxes in the userform and not from sheet. The listbox has multiple rows and columns.
I have also added a code to delete a row before final saving of the data to excel sheet.
Hence if I try to give / add a row number through a textbox in the userform to rows, it might get altered if the user deletes any of the rows before final saving the data to sheet.
e.g. if initially I transferred data in 5 rows to the listbox1, with Sr. No. 1 to 5 assigned to them through a textbox, but then decide to delete 3rd and 4th row so finally it will have only three rows numbered 1st, 2nd and 5th (now 3rd after deletion of two row) to save to the sheet. Here the sequence of row number is not proper. I want to save them as Sr. No. 1, 2, 3
My idea is to assign row number by any code to these three final rows so that the same can be captured in one of the columns (say ColumnH) in the sheet. is it possible?
Can anyone help..
I have also added a code to delete a row before final saving of the data to excel sheet.
Hence if I try to give / add a row number through a textbox in the userform to rows, it might get altered if the user deletes any of the rows before final saving the data to sheet.
e.g. if initially I transferred data in 5 rows to the listbox1, with Sr. No. 1 to 5 assigned to them through a textbox, but then decide to delete 3rd and 4th row so finally it will have only three rows numbered 1st, 2nd and 5th (now 3rd after deletion of two row) to save to the sheet. Here the sequence of row number is not proper. I want to save them as Sr. No. 1, 2, 3
My idea is to assign row number by any code to these three final rows so that the same can be captured in one of the columns (say ColumnH) in the sheet. is it possible?
Can anyone help..