Populate one workbook from another

sk33t

New Member
Joined
Sep 16, 2018
Messages
2
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
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

Forum statistics

Threads
1,215,424
Messages
6,124,817
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top