Option
Explicit
Private
Sub
CommandButton1_Click()
Call
prcSetLabel(probjLabel:=Label1)
End
Sub
Private
Sub
CommandButton2_Click()
Call
prcSetLabel(probjLabel:=Label2)
End
Sub
Private
Sub
CommandButton3_Click()
Call
prcSetLabel(probjLabel:=Label3)
End
Sub
Private
Sub
prcSetLabel(
ByRef
probjLabel
As
MSForms.Label)
With
probjLabel
.Caption =
"P"
.TextAlign = fmTextAlignCenter
.SpecialEffect = fmSpecialEffectSunken
.ForeColor = &H1DF3A
With
.Font
.Name =
"Wingdings 2"
.Size = 20
End
With
End
With
End
Sub
Friend
Sub
prcResetLabels()
Dim
objOLEObject
As
OLEObject
For
Each
objOLEObject
In
OLEObjects
With
objOLEObject
If
.progID =
"Forms.Label.1"
Then
_
.
Object
.Caption = vbNullString
End
With
Next
Call
ThisWorkbook.Save
End
Sub