Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count number of checked boxes based on name of check box

Status
Not open for further replies.

Randy w

Programmer
Sep 3, 2018
6
US
I have word document with items to be checked by user in mailmerge. I need a macro I believe so when the user clicks what the want and goes to the next name needs to be stored. This can have multiple click. I would like it to count the specific item next to it and add to a book mark at the end of the document, with the total of the items
There will also be a comment box will need to get the name of that person and the comment printed after the book marks
 
Hi,

Your requirement is not clear.

Is your document a .docm (macro enabled)?

Let’s say that there are three CheckBoxes. How does the user navigate the document, in other words how does the user get from one checkbox to the next?

How does the user indicate that they are finished? For instance the user might miss a checkbox or go back to a checkbox already processed.

WHAT VALUE(s) do you want to be stored?

WHERE do you want these results stored? Or do the results get written to the end of the document where you also want the bookmark?

What do you mean by, “This can have multiple click.”?

What do you mean by, “I would like it to count the specific item next to it”?

Where does the name of the checkbox come into play?

Could you upload your document so we can see and experiment? You can truncate and launder if necessary.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
I have mailmerge normal document
On top is the name of the person and a selection of a meal they want to pick right know I’m doing that by hand and counting the items
I’m hoping to put Check boxes next to the meal items count every meal and sides on the last page once I filled out on laptop then print
I also need an other text box if they want something different. On the last page I’d like to print the name and other info
 
Seems to me that you have a list of clients and another list of meals and your objective is to combine the clients with their desired meals, get the total number of each meal for a specific period in order to get the right meals 1) prepared and 2) delivered to each client.

Word is an application designed for WRITING. It has other features but aggregating results is definitely not one of them. Word would be very klunky to aggregate.

Excel would be much MUCH better. Can I help you with that approch? The aggregation would be much simpler and the delivery list a piece of cake, not to mix metaphors.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
BTW, where in Mass? Lived inside 128 some 40 years ago. Remember the blizzard of ‘88?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
can word at a minimum count specific check boxes if I name the Chex boxes and count them at the end of document
Just so you know every day has three different items and sides
The other box I could manually add the name and info it can at the end
I’ve also been looking into infopath would that work better
I’m more of php MySQL web developer so this new adventure
 
I barely remember 77blizzard you should have seen the one we had this year 14 inches snow
I’m in Fallriver
 
Yea it was ‘78 not ‘88 just around the time that Yaz got his 3,000 hit. Was there!

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
MySQL.

Then you could see the concept:
Table of client/address
Table of meal/entree/side/dessert

These tables can be as simple of complex as you desire. Each table is a sheet in your workbook.

Of course over time clients and meals change-table maintenence.

Simple cartesian join (MS Query) to resultset of all available meals for all clients of any meal. You could qualify the query by meal type (breakfast, lunch, dinner).

In the resultset table, on the sheet, make the meal selection for each client.

I assume this is some sort of a care residence, where the clients check off a selection menu prior to each meal.

Am I correct that you have not had much experience with Word or Excel?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Not much since lotus lol I know showing my age
I need to make it very simple other people besides me filling out the forms
Very computer ilitorate they don’t even know how to turn on lol
Trying to make it simple as possible
 
Hows this for simple. A dropdown (in-cell list data validation) for each client/meal.

Attached my workbook.

Both tables can expand row-wise.

Meal statistics in Meal List sheet.



Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
 https://files.engineering.com/getfile.aspx?folder=2229f033-1ebc-4982-aaa6-e5c7e0b0a958&file=tt-CountMeals.xlsx
Might want to have a START button to clear the Meals in Client List.

Might want a FINISH button to print the cooking stats and delivery list.

Might want to LOCK cells where you don't want changes to occur.

Someone has to be able to maintain the Tables: add/change/delete.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Have to re think this I need the slips for the cook with the name so he knows what that person is getting
 
So we do a loop thru the client name list (that ought to be another list/sheet.

Filter Client List on Client & PRINT

That gives you the Client order/routing. That’s in the FINISH button routine.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
If you insist on a Word application solution, then it WILL totally be a VBA code solution.

Your process will have to

Loop thru the mailmerge list (there is a button in Mailings once you establish your doc)

Make selection for current client.
Indicate you’re done.
Run data capture to some array

Run finals to calculate/print out cooking stats/client orders. ALL the stats will be up to you to calculate, versus a simple formula in Excel.

Someone’s gotta maintain the form with the meals. Add or delete the Form Checkboxes. THAT’S not everyday knowledge.

It will be much MUCH simpler to maintain a Meal List. SIMPLE!

You’ll need a simple list of clients from which the Client List sheet can be generated for x number of selections per meal.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...i
for a NUance![tongue][/sub]
 
BTW on the ‘78 blizzard...

“Snow fell mostly from Monday morning, February 6, to the evening of Tuesday, February 7. Connecticut, Rhode Island, and Massachusetts were hit especially hard by this storm.

Boston received a record-breaking 27.1 inches” Wikipedia.

Eastern Mass was shut down for a week. No one could drive on the streets. People were skiing in the streets. Cars had to be dug out on 128 by the National Guard.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top