Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a form set up in Excel that is attached to an inventory list also in
Excel. I type in the qty wanted of a certain product and the name of the product and the qty of the product in stock automatically populates. Is it possible to have the qty in stock updated each time I enter a qty of the product wanted... For example I need 3 of Product A and I have 5 in stock. When I'm done filing out and printing the form the inventory list updates showing that I now have 2 of Product A in stock. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put this into a Sheet Module and test with cell A1
Private Sub Worksheet_Change(ByVal Target As Excel.Range) Static productinstock As Double With Target If .Address(False, False) = "A1" Then If Not IsEmpty(.Value) And IsNumeric(.Value) Then productinstock = productinstock + .Value Else productinstock = 0 End If Application.EnableEvents = False .Value = productinstock Application.EnableEvents = True End If End With End Sub "ChrisLouie" wrote: I have a form set up in Excel that is attached to an inventory list also in Excel. I type in the qty wanted of a certain product and the name of the product and the qty of the product in stock automatically populates. Is it possible to have the qty in stock updated each time I enter a qty of the product wanted... For example I need 3 of Product A and I have 5 in stock. When I'm done filing out and printing the form the inventory list updates showing that I now have 2 of Product A in stock. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm sorry that doesn't make sense to me.
"Mike" wrote: Put this into a Sheet Module and test with cell A1 Private Sub Worksheet_Change(ByVal Target As Excel.Range) Static productinstock As Double With Target If .Address(False, False) = "A1" Then If Not IsEmpty(.Value) And IsNumeric(.Value) Then productinstock = productinstock + .Value Else productinstock = 0 End If Application.EnableEvents = False .Value = productinstock Application.EnableEvents = True End If End With End Sub "ChrisLouie" wrote: I have a form set up in Excel that is attached to an inventory list also in Excel. I type in the qty wanted of a certain product and the name of the product and the qty of the product in stock automatically populates. Is it possible to have the qty in stock updated each time I enter a qty of the product wanted... For example I need 3 of Product A and I have 5 in stock. When I'm done filing out and printing the form the inventory list updates showing that I now have 2 of Product A in stock. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a form made in Excel 2002 be converted into a fillable form? | Excel Discussion (Misc queries) | |||
how to generate a unique form # when using an excel form template | Excel Worksheet Functions | |||
how can I make a form number change everytime the form is opened | Excel Worksheet Functions | |||
How can i get an inventory list that adds and subtracts inventory | Excel Discussion (Misc queries) | |||
I created a form on excel. want to edit the form without printing | Excel Discussion (Misc queries) |