Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 07-20-2018, 01:16 PM
macropod's Avatar
macropod macropod is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


It's all in the macro code. Open the document and press Alt-F11 to access the VBA Editor. There you'll see:
Code:
            Case 2 'The 1st row of formfields
              Select Case c  'The columns of formfields
                Case 2: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 9000
                Case 4: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 4500
                Case 6: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 6000
                Case 8: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 3000
              End Select
            Case 3 'The 2nd row of formfields
              Select Case c  'The columns of formfields
                Case 2: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 8000
                Case 4: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 6000
                Case 6: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 4000
                Case 8: If .Range.FormFields(1).CheckBox.Value = True Then i = i + 2000
Simply edit the values to suit (no formatting).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #17  
Old 07-23-2018, 02:33 AM
Edwords Edwords is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2016
Novice
Assigning Currency values to checkbox with sum presented as part of paragraph
 
Join Date: Jun 2018
Location: London
Posts: 13
Edwords is on a distinguished road
Default

Apologies my confusion came as the numbers originally represented by the check boxes were different to what I could see on the code, I've adjusted the values and it works great now, thank you!

However, one of the calculations at the bottom of the page doesnt seem to be working correctly, How can I edit this as I see nothing for this on the code?

Below is an example: the last calculation where subtracting from €100,000, the number subtracted is random and not what has been assigned to any of the boxes.

Quote:
It is estimated that the maximum value of the Fleet Consultancy that your organisation will receive is €16,000. If this amount is likely to increase due to requests for additional work then you will be notified of this, in writing, before work commences.

Therefore you will be eligible to receive consultancy unless you have currently received between €184,000 and €200,000 of State Aid in the last three financial years (or between €92,000 and €100,000 for organisations in the road transport sector).

By signing the declaration overleaf, you are stating that by receiving €16,000 of free consultancy, you will not exceed your State Aid limit.
thanks again for all your help
Reply With Quote
  #18  
Old 07-23-2018, 03:04 AM
macropod's Avatar
macropod macropod is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

My understanding from what you'd previously said was that the amount to deduct from €100,000 is only half what you'd deduct from €200,000. Is that not so?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #19  
Old 07-23-2018, 03:43 AM
Edwords Edwords is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2016
Novice
Assigning Currency values to checkbox with sum presented as part of paragraph
 
Join Date: Jun 2018
Location: London
Posts: 13
Edwords is on a distinguished road
Default

No the amount to be deducted from the €100,000 is the total sum of the services selected which is the same as the the amount deducted from €200,000 not half. Apologies for causing this confusion.

How can I edit this on the form?
Reply With Quote
  #20  
Old 07-23-2018, 05:44 AM
macropod's Avatar
macropod macropod is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In that case, open the document and unprotect it (Developer|Restrict Editing>Stop Protection). Select the problem field and press Shift-F9. You should see {=100000-{DOCPROPERTY Value }/2 \# ",0"}. Simply delete the '/2', then re-apply the protection (add a password if you want one).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #21  
Old 07-23-2018, 06:13 AM
Edwords Edwords is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2016
Novice
Assigning Currency values to checkbox with sum presented as part of paragraph
 
Join Date: Jun 2018
Location: London
Posts: 13
Edwords is on a distinguished road
Default

PERFECT!!!! thank you very much for you help!!!! Excellent solutions, care and explanations, couldn't have done it without your help, thanks for helping the community!!!!
Reply With Quote
  #22  
Old 07-23-2018, 07:38 AM
Edwords Edwords is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2016
Novice
Assigning Currency values to checkbox with sum presented as part of paragraph
 
Join Date: Jun 2018
Location: London
Posts: 13
Edwords is on a distinguished road
Default

just one question, If i replaced the content control check boxes for formfield check boxes, would i be able to add a formula (containing the same conditions as those for the content control check boxes) into the formfield check boxes and get rid of the macro from the document? and will the document work correctly without the macro?
Reply With Quote
  #23  
Old 07-23-2018, 03:59 PM
macropod's Avatar
macropod macropod is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The document contains only formfields, including the checkboxes (i.e. no content control checkboxes), so there's nothing to change on that front. And, as I said in post #4:
Quote:
Anything using checkboxes will require a macro.
A formfield solution without a macro is possible possible if you replace all those checkboxes with dropodown formfields for which the user can choose between 'Yes' and 'No', for example. See attached.
Attached Files
File Type: doc Application form - Formfields.doc (68.0 KB, 10 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #24  
Old 07-24-2018, 03:29 AM
Edwords Edwords is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2016
Novice
Assigning Currency values to checkbox with sum presented as part of paragraph
 
Join Date: Jun 2018
Location: London
Posts: 13
Edwords is on a distinguished road
Default

PERFECTO!!! thanks so much for your help. I can now re work and learn from what youve shown me here
Reply With Quote
  #25  
Old 07-24-2018, 03:50 AM
macropod's Avatar
macropod macropod is offline Assigning Currency values to checkbox with sum presented as part of paragraph Windows 7 64bit Assigning Currency values to checkbox with sum presented as part of paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

To see how it's done, unprotect the document, select the entire empty paragraph immediately after the table and press Shift-F9.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
addition, assign values, subtracting



Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning Currency values to checkbox with sum presented as part of paragraph Assigning values to form fields and calculating results AustralianKate Word Tables 10 05-15-2018 10:53 PM
Can I add part of a paragraph to the document map? Jennifer Murphy Word 1 05-28-2017 11:23 PM
Assigning Currency values to checkbox with sum presented as part of paragraph Assigning values to formfield checkboxes in a table mammiano Word Tables 13 01-12-2015 06:27 AM
Assigning Currency values to checkbox with sum presented as part of paragraph Set style for part of paragraph meileetan Word 7 06-07-2013 01:09 AM
Assigning Currency values to checkbox with sum presented as part of paragraph Assigning Values to content control checkboxes and calculating results creative cathy Word Tables 13 10-07-2012 08:52 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:17 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft