r_johnston
asked on
Button Color Changes In .dotm but not .doc mode...
Hey Experts,
I have a strange issue; the following code works in a Word .dotm but doesn't work when you open the template by double left clicking (regular .doc mode).
The ToggleCounter variable is located in a Module as a Byte.
Change the file extension to .dotm
Any thoughts?
I have a strange issue; the following code works in a Word .dotm but doesn't work when you open the template by double left clicking (regular .doc mode).
Private Sub txtRequestor_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ToggleCounter = 1
Counter
End Sub
'===========================================================================================
Sub Counter() 'Toggles cmdStartRequest color every one second via "ColorToggle" sub
Application.OnTime Now() + TimeValue("00:00:01"), "ColorToggle"
End Sub
'===========================================================================================
Sub ColorToggle() 'Toggles cmdStartRequest background color
If ToggleCounter = 5 Then
Exit Sub
Else
If cmdStartRequest.BackColor = 3158271 Then
cmdStartRequest.BackColor = 65280 'Green
Else
cmdStartRequest.BackColor = 3158271 'Red
End If
ToggleCounter = ToggleCounter + 1
Counter
End If
End Sub
'===========================================================================================
The ToggleCounter variable is located in a Module as a Byte.
Change the file extension to .dotm
Any thoughts?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!