Inventory
Solved/Closed
Related:
- Inventory
- Ocs inventory - Download - Business management
- Basic inventory control herunterladen - Download - Business management
- How to change inventory privacy steam - Guide
2 responses
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
11 Mar 2013 à 12:46
11 Mar 2013 à 12:46
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 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
12 Mar 2013 à 12:06
12 Mar 2013 à 12:06
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
11 Mar 2013 à 13:36
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
12 Mar 2013 à 20:59
Maybe its because Office2010?
16 Mar 2013 à 12:20
17 Mar 2013 à 21:00