#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Form / Inventory

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Form / Inventory

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default Form / Inventory

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a form made in Excel 2002 be converted into a fillable form? Paraclete Excel Discussion (Misc queries) 1 February 20th 07 09:20 PM
how to generate a unique form # when using an excel form template PJE Excel Worksheet Functions 1 May 24th 06 11:00 PM
how can I make a form number change everytime the form is opened babydumplingspita Excel Worksheet Functions 1 October 10th 05 07:58 PM
How can i get an inventory list that adds and subtracts inventory James Excel Discussion (Misc queries) 0 October 5th 05 12:48 AM
I created a form on excel. want to edit the form without printing Oz Excel Discussion (Misc queries) 1 September 1st 05 08:18 PM


All times are GMT +1. The time now is 02:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"