Is there a way to make it so when a VBA MS Word Userform toggle button is clicked only part of the caption text changes colors?
E.g. "Upper (case) / Lower (case)." Upper turns from black to green when clicked, before reverting to black after a few seconds. And the same with Lower the next time the button is clicked.
I have no clue how to do this.
The code so far that changes the entire caption that I have is:
Private Sub CommandButton199_Click()
CommandButton199.BackColor = 8388608
Selection.range.Case = wdToggleCase
Application.OnTime when:=Now + TimeValue("00:00:04"), _
Name:="Module2.macro2"
End Sub
Sub MACRO2()
Dim myArray As Variant
myArray = Array(199) ' [I'm going to be adding another dozen buttons]
For x = LBound(myArray) To UBound(myArray)
Normal.Fonts.Controls("CommandButton" & Val(myArray(x))).BackColor = 8421376
Next x
End Sub