R
Rick's News
What is the proper syntax to bold a textfield in VBA?
is it:
[textbox].FontWeight = Bold
[textbox].FontWeight = Normal
Also, is this the best way to code this or is there a more efficient way:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If [CorrectAnswer] = "A" Then
AnswerA.ForeColor = "255"
Label10.ForeColor = "255"
Else:
AnswerA.ForeColor = "0"
Label10.ForeColor = "0"
End If
If [CorrectAnswer] = "B" Then
AnswerB.ForeColor = "255"
Label11.ForeColor = "255"
Else:
AnswerB.ForeColor = "0"
Label11.ForeColor = "0"
End If
If [CorrectAnswer] = "C" Then
AnswerC.ForeColor = "255"
Label12.ForeColor = "255"
Else:
AnswerC.ForeColor = "0"
Label12.ForeColor = "0"
End If
If [CorrectAnswer] = "D" Then
AnswerD.ForeColor = "255"
Label13.ForeColor = "255"
Else:
AnswerD.ForeColor = "0"
Label13.ForeColor = "0"
End If
End Sub
Please help...
I know this is an easy one...
Thanks for your time...
-Rick
is it:
[textbox].FontWeight = Bold
[textbox].FontWeight = Normal
Also, is this the best way to code this or is there a more efficient way:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If [CorrectAnswer] = "A" Then
AnswerA.ForeColor = "255"
Label10.ForeColor = "255"
Else:
AnswerA.ForeColor = "0"
Label10.ForeColor = "0"
End If
If [CorrectAnswer] = "B" Then
AnswerB.ForeColor = "255"
Label11.ForeColor = "255"
Else:
AnswerB.ForeColor = "0"
Label11.ForeColor = "0"
End If
If [CorrectAnswer] = "C" Then
AnswerC.ForeColor = "255"
Label12.ForeColor = "255"
Else:
AnswerC.ForeColor = "0"
Label12.ForeColor = "0"
End If
If [CorrectAnswer] = "D" Then
AnswerD.ForeColor = "255"
Label13.ForeColor = "255"
Else:
AnswerD.ForeColor = "0"
Label13.ForeColor = "0"
End If
End Sub
Please help...
I know this is an easy one...
Thanks for your time...
-Rick