I am trying to create a a vba code to a supply order form that adds a new row only if the last row has data.
I have a separate inventory sheet and vba that searches that inventory sheet for shortages and expired items, then automatically fills in the supply order form with those items and quantities. However, the form only goes from row 24 to row 53 (one page). If I have a lot of items to order, I don't have enough room on the form. I'm trying to see if I can have the code add an additional row to the end of the list (there is some data below the table that needs to stay below - thus move down with each additional row) only when needed.
Right now the code begins at row 53, looks up until a row with data is found, then drops one row and adds the needed supply data. The problem begins when row 53 is used and more items are needed. I need to have the code add a "row 54" and add the additional data, and then "row 55", and so on, until all the items needed are listed.
Any ideas or help would be greatly appreciated.
I have a separate inventory sheet and vba that searches that inventory sheet for shortages and expired items, then automatically fills in the supply order form with those items and quantities. However, the form only goes from row 24 to row 53 (one page). If I have a lot of items to order, I don't have enough room on the form. I'm trying to see if I can have the code add an additional row to the end of the list (there is some data below the table that needs to stay below - thus move down with each additional row) only when needed.
Right now the code begins at row 53, looks up until a row with data is found, then drops one row and adds the needed supply data. The problem begins when row 53 is used and more items are needed. I need to have the code add a "row 54" and add the additional data, and then "row 55", and so on, until all the items needed are listed.
Any ideas or help would be greatly appreciated.