Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AB AB is offline
external usenet poster
 
Posts: 33
Default Counting using a form

I've created a user form where they select a product and input associated
quantity, weight, and value.

There is an "Add to Tally" button that should cause the form to accept the
amounts into variables and then clear the form for the next order in the
consolidation. The same product may show up several times at different
quantities, weights, and values, adding to the tally each time.

When the user is done collecting the consolidation information, there is a
second button which should output the totals to specific fields in my
spreadsheet and reset the variables to 0 for the next order consolidation.

I'm having my problems in creating this counting mechanism because I don't
know if I need to build an array (or how to do it) or 3 variables for each of
the 13 products and how to keep the tally.

Any ideas and/or code snippets would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Counting using a form

I would think about just adding the new values to the specific cells
when they hit the "Add to Tally" button.

If you have a row for each order and a column for each product...

cells(orderNumber,productNumber) = cells(orderNumber,productNumber)
+ me.textBox.value



AB wrote:
I've created a user form where they select a product and input associated
quantity, weight, and value.

There is an "Add to Tally" button that should cause the form to accept the
amounts into variables and then clear the form for the next order in the
consolidation. The same product may show up several times at different
quantities, weights, and values, adding to the tally each time.

When the user is done collecting the consolidation information, there is a
second button which should output the totals to specific fields in my
spreadsheet and reset the variables to 0 for the next order consolidation.

I'm having my problems in creating this counting mechanism because I don't
know if I need to build an array (or how to do it) or 3 variables for each of
the 13 products and how to keep the tally.

Any ideas and/or code snippets would be greatly appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.programming
AB AB is offline
external usenet poster
 
Posts: 33
Default Counting using a form

Great suggestion. I had to tweak it a bit, but you pointed me in the right
direction.

Thank you.

-AB

" wrote:

I would think about just adding the new values to the specific cells
when they hit the "Add to Tally" button.

If you have a row for each order and a column for each product...

cells(orderNumber,productNumber) = cells(orderNumber,productNumber)
+ me.textBox.value



AB wrote:
I've created a user form where they select a product and input associated
quantity, weight, and value.

There is an "Add to Tally" button that should cause the form to accept the
amounts into variables and then clear the form for the next order in the
consolidation. The same product may show up several times at different
quantities, weights, and values, adding to the tally each time.

When the user is done collecting the consolidation information, there is a
second button which should output the totals to specific fields in my
spreadsheet and reset the variables to 0 for the next order consolidation.

I'm having my problems in creating this counting mechanism because I don't
know if I need to build an array (or how to do it) or 3 variables for each of
the 13 products and how to keep the tally.

Any ideas and/or code snippets would be greatly appreciated.



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
counting function but not double counting duplicates JRD Excel Worksheet Functions 2 November 7th 07 06:43 PM
Strange issue freezing parent form when unloading a child form Stefano Gatto Excel Programming 1 November 11th 05 04:42 PM
form in excel to be attached to the emails address in the form upon sumission Abdulkader Bhanpurawala via OfficeKB.com Excel Programming 6 July 10th 05 10:48 AM
Counting Rows Then Counting Values in Columns Michael via OfficeKB.com Excel Programming 1 June 1st 05 04:10 PM
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? Daniel[_14_] Excel Programming 1 August 29th 04 01:20 PM


All times are GMT +1. The time now is 08:17 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"