I am new to VBA. I made a userform to help with inventory management. The userform allows users to put information into a workbook similar to InventoryExample.xlsm where there are multiple sheets, the real one has close to 40 sheets each for a different "animal". The userform allows users to add or receive parts, so that stock numbers in workbook InventoryExample.xlsm are always up to date.
We already have separate workbooks for each "animal" where the "Quantity to order" column is used for ordering, and I cant modify the layout of these workbooks.
I have a macro that when run in ImportExample.xlsm opens a userform.
I want the user to enter an animal name into the textbox on the userform, then when they click submit, the code will go down column A in the current workbook (ImportExample.xlsm), checking each part number for a matching part number in the the closed (or opened by code) workbook (InventoryExample.xlsm). The sheet to check will be determined by the value entered in the textbox. When a matching part number is found the code should copy the corresponding stock from InventoryExample.xlsm to the correct spot in the current work book (ImportExample.xlsm). The code should then continue to move down column A until all part numbers have been checked. If no match is found, the cell should be left empty.
https://ibb.co/ipuWme - ImportExample.xlsm screenshot
https://ibb.co/dRirme - InventoryExample.xlsm screenshot
Any tips?
I Have learned a lot over the past week coding the inventory management, but I cant figure out where to start with this.
Thank you for your time
We already have separate workbooks for each "animal" where the "Quantity to order" column is used for ordering, and I cant modify the layout of these workbooks.
I have a macro that when run in ImportExample.xlsm opens a userform.
I want the user to enter an animal name into the textbox on the userform, then when they click submit, the code will go down column A in the current workbook (ImportExample.xlsm), checking each part number for a matching part number in the the closed (or opened by code) workbook (InventoryExample.xlsm). The sheet to check will be determined by the value entered in the textbox. When a matching part number is found the code should copy the corresponding stock from InventoryExample.xlsm to the correct spot in the current work book (ImportExample.xlsm). The code should then continue to move down column A until all part numbers have been checked. If no match is found, the cell should be left empty.
https://ibb.co/ipuWme - ImportExample.xlsm screenshot
https://ibb.co/dRirme - InventoryExample.xlsm screenshot
Any tips?
I Have learned a lot over the past week coding the inventory management, but I cant figure out where to start with this.
Thank you for your time