Userform to update sheet totals

Lynton

New Member
Joined
Mar 13, 2011
Messages
28
I have a simple spreadsheet that records electronic components in stock:
3 columns labelled Part Id: , description:, Stock.
I have created a user form With 2 text boxes Labelled, Part Id: and Quantity.
The user form has two Command Buttons Labelled Update and Close.
I need to Input data in to the user form (Part id and Quantity) and press the update button, It then should finds the correct part using the Unique part Id and add the quantity to the existing stock level.
Pressing the close button should close the data entry form.
any help appreciated.
Thankyou
 
One last request could we make both Txt Boxes clear when the update button is pressed. it would speed up data input.

Add the two lines after the Msgbox shown in BOLD

Rich (BB code):
 MsgBox strPrompt & "Stock Qty Updated", 64, "Success"
  Me.txtQty.Value = ""
  With Me.txtPartID: .Value = "": .SetFocus: End With

Dave
 
Upvote 0
Solution

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Add the two lines after the Msgbox shown in BOLD

Rich (BB code):
 MsgBox strPrompt & "Stock Qty Updated", 64, "Success"
  Me.txtQty.Value = ""
  With Me.txtPartID: .Value = "": .SetFocus: End With

Dave
Many thanks again for all your help now all working perfectly.
Lynton
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,177
Members
452,615
Latest member
bogeys2birdies

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