Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2015, 02:43 AM
a888 a888 is offline Setting a particular table cell background color when an option button is selected in Word 2007 Windows 8 Setting a particular table cell background color when an option button is selected in Word 2007 Office 2007
Novice
Setting a particular table cell background color when an option button is selected in Word 2007
 
Join Date: Feb 2015
Posts: 12
a888 is on a distinguished road
Default

Thanks so much Greg for your kind help



The code worked great. It first threw a runtime error (this command is not available) and figured out I had to remove protection of the doc for it to work which is fine with me.

Quote:
Originally Posted by gmaxey View Post
I'm not a big fan of ActiveX controls in Word
I wonder if there is a better choice for having option buttons functionality (allowing only one answer be selected) that I can use instead especially as I mentioned before the document takes ages to load when the number of option buttons is big as in the case of this one (90 x 2 ).

Quote:
Code:
Private Sub OptionButton1n_Change(): ChangeState OptionButton1n: End Sub
Private Sub OptionButton2n_Change(): ChangeState OptionButton2n: End Sub
Private Sub OptionButton3n_Change(): ChangeState OptionButton3n: End Sub
Private Sub OptionButton4n_Change(): ChangeState OptionButton4n: End Sub
Private Sub OptionButton5n_Change(): ChangeState OptionButton5n: End Sub
Private Sub OptionButton6n_Change(): ChangeState OptionButton6n: End Sub
My actual document has 90 questions and I hope there is a solution to avoid having to repeat the above code for each of the 90 questions ! If having a very long code and repetition won't affect the performance/ loading of the document, then I can repeat the code line for each of the 90 though.

Quote:
Code:
 If fcnCellText(oRow.Cells(lngIndex)) = "Y" Then
I have some cells with "Y*" instead of "Y" and the code is ignoring those ones. It would be great if it can recognise Y* as well as Y.

Thanks so much for all your kind help
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting a particular table cell background color when an option button is selected in Word 2007 How to remove background color in a table that isn't there but is there? pintree3 Word 5 10-27-2014 10:23 AM
Can't change table background color in the header in Microsoft Word 2011 simeon1 Word 0 10-13-2014 11:07 AM
Option Button selected will display text ksigcajun Word VBA 7 07-14-2014 09:31 AM
Setting a particular table cell background color when an option button is selected in Word 2007 Cell Background Color: Base it on Content of Cell? tatihulot Excel 4 08-14-2013 03:24 PM
Change cell color everytime a value is selected in dropdown list angelica_gloria Excel 4 01-27-2012 06:47 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:25 AM.


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