I am trying to build an Excel database for my son's restaurant to manage recipes and foods costs. I am very familiar with building database applications in MS Access but I am very new to doing the same thing using excel. Formulas, etc. on a spreadsheet are easy but the idea of formatted tabled and relationships is very foreign to me. I have my table(s) created with several calculated columns that are all functioning well. I want to use a userform to enter data into the table and I know that the code is different than entering into an unformatted range on a sheet.. I have been reading and trying different things but so far have been unable to get anything to work for me.
My table (tlProducts) has 25 columns but only 7 of them are on the userform. The remaining columns are calculated based on data entered. The form controls include, txtProductID, txtProductName, txtDate, txtSize, cboUnit, txtPrice, txtYield. I need to find the end of the table, create a new row and enter the data in that row. The code that has been suggested to me is below, however it produces the error, 9 - Sub script out of range. The range of my table (tblProducts) is C7:Y12 (header row included). I also want to lookup the max ID number and increase by one for the new record. I have been getting so frustrated. I think things make sense but then it fails. Perhaps I have bitten off more than I can chew but I really want to learn and get a functioning application for my son's restaurant. Any help you can give me would be greatly appreciated.
Bookmarks