Hi guys,

I am creating an useform, where I have more then 60 labels.
I do not want to write 56-times the below written code and everywhere change number of label. Is it possible instead of this make one macro?

VB Code:
  1. Private Sub Label1_Click()
  2. UserForm1.Controls(labelname).SpecialEffect = fmSpecialEffectFlat
  3. labelname = "label1"
  4. UserForm1.Label1.SpecialEffect = fmSpecialEffectSunken
  5.  
  6. GetRGB UserForm1.Label1.BackColor, Red, Green, Blue
  7. RGBToHSL
  8. UserForm1.TextBox4.Value = Red
  9. UserForm1.TextBox5.Value = Green
  10. UserForm1.TextBox6.Value = Blue
  11. UserForm1.TextBox1.Value = H
  12. UserForm1.TextBox2.Value = S
  13. UserForm1.TextBox3.Value = L
  14. UserForm1.SpinButton1.Value = H
  15. UserForm1.SpinButton2.Value = S
  16. UserForm1.SpinButton3.Value = L
  17. UserForm1.SpinButton4.Value = Red
  18. UserForm1.SpinButton5.Value = Green
  19. UserForm1.SpinButton6.Value = Blue
  20. UserForm1.Label63.BackColor = UserForm1.Label1.BackColor
  21. End Sub

Boris