Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 07-31-2018, 11:19 PM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

How convey this code to another documents???

Its only working in the same document. But i need to workout this to other documents.

Please advise.
Reply With Quote
  #17  
Old 08-01-2018, 12:53 AM
macropod's Avatar
macropod macropod is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows 7 64bit Need macro for automatic point value insertion based on the number of answer choices selected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Simply create a dotm template based on the document I supplied - or save it as a dotm template - then use that template for the creation of new documents (which you can save in the docx format). Provided the documents created from that template can access it, they content controls will continue to work.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #18  
Old 08-01-2018, 01:33 AM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Yes!! i got it

Thanks much again!!
Reply With Quote
  #19  
Old 08-01-2018, 03:37 AM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Post Need VBA code for automatic point value update

Please refer the attached sample doc which is needs to be update automatically in point value section based on the number answers selected in the first column.

Answer choices are may be select both "X" or numeric (1,2,...etc).

So, the point value will be updated automatically as 01 for one answer selection, 02 for two answer choices selection and so on...

Please help out on this.
Attached Files
File Type: docx sample.docx (99.1 KB, 10 views)
Reply With Quote
  #20  
Old 08-01-2018, 05:30 AM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Can anyone help out on this???
Reply With Quote
  #21  
Old 08-01-2018, 06:02 AM
macropod's Avatar
macropod macropod is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows 7 64bit Need macro for automatic point value insertion based on the number of answer choices selected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

I think a little patience on your part wouldn't go astray. It also would have been helpful had you specified your requirements in full from the outset. So far you've made it like getting blood out of a stone... This should also have been posted as a follow-up in the original thread alone. Threads merged.

Change:
If .Range.Text = "X" Then j = j + 1
to:
If Trim(.Range.Text) <> "" Then j = j + 1
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #22  
Old 08-01-2018, 06:13 AM
macropod's Avatar
macropod macropod is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows 7 64bit Need macro for automatic point value insertion based on the number of answer choices selected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Cross-posted at: https://social.msdn.microsoft.com/Fo...?forum=worddev
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #23  
Old 08-01-2018, 06:15 AM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

I am really Sorry about that Paul!!

I don't think you working on this. That's why i just created again..

Also i never except to come another option (numeric value) in this code.

Once again my Apologies!!!

I will check on this and let you know..

Thanks much!!!
Reply With Quote
  #24  
Old 08-08-2018, 10:53 PM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Post new macro not working

Hi Paul!!!

The above modification code is not working for me.

Can you please check on this??
Reply With Quote
  #25  
Old 08-08-2018, 11:52 PM
macropod's Avatar
macropod macropod is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows 7 64bit Need macro for automatic point value insertion based on the number of answer choices selected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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 works for me...
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #26  
Old 08-10-2018, 12:10 AM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Thanks for checking Paul!!!

I can able to access this macro now.

But i have the another doubt like,

if content control having the different titles called as "Correct Answer Match", "Correct Answer Label" etc...

What we can do??

thanks
Ganesan. G
Reply With Quote
  #27  
Old 08-10-2018, 04:45 AM
macropod's Avatar
macropod macropod is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows 7 64bit Need macro for automatic point value insertion based on the number of answer choices selected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

You might, for example, change:
If .Title <> "Correct Answer" Then Exit Sub
to:
If Instr(.Title, "Correct Answer") <> 1 Then Exit Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #28  
Old 08-10-2018, 04:53 AM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Thanks for the reply....

If i supposed to be use multiple styles instead of change the style?
Reply With Quote
  #29  
Old 08-10-2018, 03:23 PM
macropod's Avatar
macropod macropod is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows 7 64bit Need macro for automatic point value insertion based on the number of answer choices selected Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

This has nothing to do with Styles, but everything to do with your content control titles.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #30  
Old 08-12-2018, 09:38 PM
ganesang ganesang is offline Need macro for automatic point value insertion based on the number of answer choices selected Windows XP Need macro for automatic point value insertion based on the number of answer choices selected Office 2016
Competent Performer
Need macro for automatic point value insertion based on the number of answer choices selected
 
Join Date: Jul 2018
Posts: 171
ganesang is on a distinguished road
Default

Hi Paul,

Thanks for the reply...

Sorry i am just asking about the content control titles if it is have more than one title as mentioned above, how we can modify the macro?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need macro for automatic point value insertion based on the number of answer choices selected Cursor location on first click -- insertion point stevec5088 Word 1 12-14-2016 02:45 PM
Need macro for automatic point value insertion based on the number of answer choices selected Move Insertion Point with VBA Grasor Word VBA 2 10-11-2016 08:50 PM
Need macro to fill data from different sheets based on selected item from drop down skorasika Excel Programming 1 03-13-2015 11:25 AM
Populate a table based on choices from drop down menu Xaand Word VBA 0 02-25-2014 11:08 AM
Need macro for automatic point value insertion based on the number of answer choices selected Insertion point not working pmahoney14 Word 1 05-24-2012 04:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:24 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