I don't think it's possible to change the forecolor for disabled label.
A possibility is to work with 2 labels on the same place and with the same dimensions:
label1 with index 0 to receive the clicks
label1 with index 1 (with your disable color) to be visible if label1(0) is disabled
Use the "Visible" status in stead of "Enable" for the Label1(0)
- Option Explicit
-
-
Private Sub Form_Load()
-
With Label1(0) '§ click
-
.Visible = True
-
End With
-
With Label1(1) '§ show with disable color
-
.Visible = False
-
.Top = Label1(0).Top
-
.Left = Label1(0).Left
-
.Width = Label1(0).Width
-
.Height = Label1(0).Height
-
End With
-
End Sub
-
-
Private Sub Com_Disable_Click()
-
Label1(0).Visible = False
-
Label1(1).Visible = True
-
End Sub
-
-
Private Sub Com_Enable_Click()
-
Label1(0).Visible = True
-
Label1(1).Visible = False
-
End Sub
-
-
Private Sub Label1_Click(Index As Integer)
-
If Index = 0 Then
-
With Label1(0)
-
.Caption = Val(.Caption) + 1
-
Label1(1).Caption = .Caption
-
End With
-
End If
-
End Sub