Gruppe
Dialog
Problem
Wie kann ich in XL8 auf einzelne, vorher durch VBA-Code erzeugte Label zugreifen und deren Caption neu festlegen?
ClassModule: Tabelle1
StandardModule: basMain
Sub CallForm()
frmLabel.Show
End Sub
ClassModule: frmLabel
Private Sub cmdContinue_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim lbl As MSForms.Label
Dim iCounter As Integer
For iCounter = 1 To 3
Set lbl = Controls.Add("Forms.Label.1")
With lbl
.Top = iCounter * 15
.Left = 20
.Caption = lbl.Name
End With
Next iCounter
For iCounter = 1 To 3
Controls("Label" & iCounter).Caption = _
"Testlabel Nr. " & iCounter
Next iCounter
End Sub