Gruppe
Dialog
Problem
Wie kann ich eine Reihe von Zelladressen in eine ListBox übernehmen und nach Auswahl in der ListBox ansteuern?
ClassModule: frmAuswahl
Private Sub cmdAuswahl_Click()
Dim iCounter As Integer
Dim sTxt As String
For iCounter = 0 To lstAuswahl.ListCount - 1
If lstAuswahl.Selected(iCounter) Then
sTxt = sTxt & lstAuswahl.List(iCounter) & ","
End If
Next iCounter
sTxt = Left(sTxt, Len(sTxt) - 1)
Range(sTxt).Select
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
lstAuswahl.List = Range("A1").CurrentRegion.Value
End Sub
StandardModule: basMain
Sub CallForm()
frmAuswahl.Show
End Sub