Labelname ändern

Visual Basic:
Dim kl0, kl1, kl2, kl3, vlm

Private Sub Label1_Change(Index As Integer)
 If Index = 0 Then
  For vlm = 1 To Label2.UBound
   Unload Label2(vlm)
  Next
  If Label1(0).Caption > 0 Then
   For vlm = 0 To kl0
    If vlm > 0 Then Load Label2(vlm)
     With Label2(vlm)
         .Top = Label2(0).Top - (.Height + 40) * (vlm Mod 90): .Visible = True
    End With
   Next
  End If
 End If
 If Index = 1 Then
  For vlm = 1 To Label3.UBound
   Unload Label3(vlm)
  Next
  If Label1(1).Caption > 0 Then
   For vlm = 0 To kl1
    If vlm > 0 Then Load Label3(vlm)
     With Label3(vlm)
         .Top = Label3(0).Top - (.Height + 40) * (vlm Mod 90): .Visible = True
    End With
   Next
  End If
 End If
 If Index = 2 Then
  For vlm = 1 To Label4.UBound
   Unload Label4(vlm)
  Next
  If Label1(2).Caption > 0 Then
   For vlm = 0 To kl2
    If vlm > 0 Then Load Label4(vlm)
     With Label4(vlm)
         .Top = Label4(0).Top - (.Height + 40) * (vlm Mod 90): .Visible = True
    End With
   Next
  End If
 End If
 If Index = 3 Then
  For vlm = 1 To Label5.UBound
   Unload Label5(vlm)
  Next
  If Label1(3).Caption > 0 Then
   For vlm = 0 To kl3
    If vlm > 0 Then Load Label5(vlm)
     With Label5(vlm)
         .Top = Label5(0).Top - (.Height + 40) * (vlm Mod 90): .Visible = True
    End With
   Next
  End If
 End If
End Sub

Private Sub Label1_Click(Index As Integer)
 If Index = 0 Then kl0 = kl0 + 1: Label1(0).Caption = kl0 + 1
 If Index = 1 Then kl1 = kl1 + 1: Label1(1).Caption = kl1 + 1
 If Index = 2 Then kl2 = kl2 + 1: Label1(2).Caption = kl2 + 1
 If Index = 3 Then kl3 = kl3 + 1: Label1(3).Caption = kl3 + 1
End Sub

Beispiel.jpg

So ungefähr hab ich mir das vorgestellt. also muss ich den code *Private Sub Label1_Change(Index As Integer)* nun 12mal für jeden Monat schreiben...
 
Das erinnert mich eher an ein VU-Meter/Spektrum Anzeige....
Würde mal danach suchen, obs da vielleicht schon was fertiges gibt.

Alternativ würde ich mal nach "vertikaler Progressbar" suchen (bzw. auf englisch)
 
Zurück