Search closed workbook for value and add to current workbook

Status
Not open for further replies.

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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Duplicate https://www.mrexcel.com/forum/excel-questions/1070890-populate-one-workbook-another.html

Please do not post the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
Per forum rules, posts of a duplicate nature will be locked or deleted (rule 12 here: Forum Rules).

If you do not receive a response, you can "bump" it by replying to it again, though we advise you to wait 24 hours before doing and not to bump a thread more than once a day.

 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,819
Messages
6,121,729
Members
449,049
Latest member
MiguekHeka

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