Inventory
Solved/Closed
Related:
- Inventory
- Oc inventory - Download - Business management
- How to set steam inventory to public - Guide
- Small Business Inventory Control - Download - Business management
2 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Mar 11, 2013 at 12:46 PM
Mar 11, 2013 at 12:46 PM
Hi Ashley,
Are your Inventory and Invoices in the same workbook or many different ones?
What is the moment you want to subtract from inventory?
When you enter the amount? This means no mistakes can be made or more will be subtracted.
Best regards,
Trowa
Are your Inventory and Invoices in the same workbook or many different ones?
What is the moment you want to subtract from inventory?
When you enter the amount? This means no mistakes can be made or more will be subtracted.
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Mar 12, 2013 at 12:06 PM
Mar 12, 2013 at 12:06 PM
Hi Ashley,
I'm guessing you have a template for the invoices.
Paste this code under ThisWorkbook in the template:
Find the text C:\Documents\Inventory.xls and change it to match your situation.
Now when you save your invoice template and giving it a new name (Save as...), the inventory file is opened and the stock in A1 is adjusted according to the data in A10 from the invoice template.
Remember that each time the invoice is saved, the code will run and inventory wil be adjusted.
Best regards,
Trowa
I'm guessing you have a template for the invoices.
Paste this code under ThisWorkbook in the template:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim aW As Workbook Set aW = ActiveWorkbook Workbooks.Open Filename:="C:\Documents\Inventory.xls" Range("A1").Value = Range("A1").Value - aW.Sheets("Sheet1").Range("A10").Value Workbooks("Inventory").Close savechanges:=True End Sub
Find the text C:\Documents\Inventory.xls and change it to match your situation.
Now when you save your invoice template and giving it a new name (Save as...), the inventory file is opened and the stock in A1 is adjusted according to the data in A10 from the invoice template.
Remember that each time the invoice is saved, the code will run and inventory wil be adjusted.
Best regards,
Trowa
Mar 11, 2013 at 01:36 PM
Yes, I have a file- Inventory, and many different files of Invoices.
I need the item from Inventory to be subtracted after I create the new Invoice and save it.
Thanks
Mar 12, 2013 at 08:59 PM
Maybe its because Office2010?
Mar 16, 2013 at 12:20 PM
Mar 17, 2013 at 09:00 PM