View Single Post
 
Old 02-23-2021, 07:23 PM
jeffreybrown jeffreybrown is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Hi Andrew,

So, fixed the Checkbox CC's and it's working great now.

Instead of the message box, I added a table to store the score. Not sure how I want to process the score right now so I just did a simple divide right to wrong.

One more question if I could. The correct answer gets the green font, but it also gets the highlight. Can I apply the green font and a different highlight to the correct question?

Code:
'  MsgBox "Correct answers: " & iRight & vbCr & "Out of: " & iQuestions, vbInformation + vbOKOnly, "Paper Score Method 2"
  
    With ActiveDocument.Tables(1)
        .Cell(2, 1).Range.Text = iRight
        .Cell(2, 2).Range.Text = iQuestions
        .Cell(2, 3).Range.Text = Format(iRight / iQuestions, "0.00%")
        .Cell(2, 3).Range.Font.TextColor = wdColorRed
        .Cell(2, 3).Range.Font.Bold = True
    End With
Reply With Quote