View Single Post
 
Old 12-15-2017, 09:26 AM
TMAL TMAL is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Nov 2017
Location: Halifax, NS, Canada
Posts: 4
TMAL is on a distinguished road
Default

Follow-up question; this may not be related.

After working on the above template I went back to working on another project that I had completed about a month ago to put in some minor updates. It's a word document with about 100 questions, with radio buttons and checkboxes used for the various responses. I have VB code so that when a button is selected, the associated text changes to green (for positive responses) or red (for negative responses); however, when I opened the document today, none of those colour changes appear to be working. There don't appear to be any issues with the code itself, but I can't figure out for the life of me why it's not working.

Most of the code would look something like this:

Code:
 
Private Sub CheckBox223_Click()
    If CheckBox223.Value = vbChecked Then
        CheckBox223.ForeColor = vbBlack
    Else:
        CheckBox223.ForeColor = RGB(0, 128, 0)
    End If
End Sub
or

Code:
 
Private Sub OptionButton61_Change()
 With OptionButton61
 If .Value Then
 .ForeColor = RGB(0, 128, 0)
 Else
 .ForeColor = vbWindowText 
 End If
 End With
 End Sub
I'm stumped. I spoke with a few of my colleagues that I had designed the document for, and it appears that the colour changes are still working on their end. Hope I'm not missing something super obvious here.
Reply With Quote