![]() |
#2
|
||||
|
||||
![]()
While what you ask is possible. It requires a lot of error checking to ensure that the count is a true reflection of the selections. It requires the user to tab through each to increment the values. Simply leaving the values at their defaults will not increment the count.
I believe it would make more sense to use a macro to count the values after they have all been completed. That way there should be no false values. e.g. Code:
Sub CountValues() Dim A_Count As Long Dim B_Count As Long Dim C_Count As Long Dim oFF As FormField A_Count = 0 B_Count = 0 C_Count = 0 For Each oFF In ActiveDocument.FormFields If oFF.Type = wdFieldFormDropDown Then Select Case oFF.Result Case "A": A_Count = A_Count + 1 Case "B": B_Count = B_Count + 1 Case "C": C_Count = C_Count + 1 Case Else End Select End If Next oFF MsgBox "A - Selected " & A_Count & vbCr & _ "B - Selected " & B_Count & vbCr & _ "C - Selected " & C_Count lbl_Exit: Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
bookmarks, word 2003, word vba macro |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dropdown list, Macro | shield5 | Excel Programming | 7 | 10-27-2013 01:51 AM |
![]() |
gsrikanth | Excel Programming | 1 | 07-12-2012 07:40 AM |
Check box macro help needed | Aflac | Word | 4 | 03-24-2012 07:11 PM |
Macro to populate a text form field based on dropdown selection | koloa | Word | 0 | 10-20-2011 11:52 AM |
![]() |
Johnny thunder | Word VBA | 12 | 04-07-2011 04:47 PM |