bin nicht gerade ein as in vba
ich würde gerne eine userform mit einem textfeld erstellen wo die spalten aus b.c.und d eingelesen werden. Die Zeilenzahl ist jedoch variabel.
wie kann ich das realisieren?
danke im voraus
moritz
Private Sub UserForm_Initialize()
Dim I As Double
I = Worksheets(1).Range("A1").Value
TextBox1.Value = Range("B" & I).Value & Range("C" & I).Value & Range("D" & I).Value
End Sub
Private Sub UserForm_Initialize()
Dim I As Double
I = Range("A1").Value
TextBox1.Value = Range("b" & I).Value
TextBox2.Value = Range("c" & I).Value
TextBox3.Value = Range("d" & I).Value
End Sub
Private Sub UserForm_Initialize()
Dim L As Long
ActiveWorkbook.Sheets("tabelle2").Select
L = Range("b2").End(xlDown).Row
TextBox1.Value = Range("B" & L).Value & Range("C" & L).Value & Range("D" & L).Value
End Sub
Private Sub UserForm_Initialize()
Dim LoI As Long
Dim LoLetzte As Long
With Worksheets(1)
If .[b65536] = "" Then
LoLetzte = .[b65536].End(xlUp).Row
Else
LoLetzte = 65536
End If
For LoI = 2 To LoLetzte
TextBox1.Value = TextBox1.Value & .Cells(LoI, 2) & .Cells(LoI, 3) & .Cells(LoI, 4)
Next LoI
End With
End Sub
Private Sub UserForm_Initialize()
Dim LoI As Long
Dim LoLetzte As Long
With Worksheets(1)
If .[b65536] = "" Then
LoLetzte = .[b65536].End(xlUp).Row
Else
LoLetzte = 65536
End If
For LoI = 2 To LoLetzte
ListBox1.AddItem .Cells(LoI, 2) & .Cells(LoI, 3) & .Cells(LoI, 4)
Next LoI
End With
End Sub
Private Sub UserForm_Initialize()
Dim lngRow As Long
Dim strTxt As String
lngRow = 1
Do Until IsEmpty(Cells(lngRow, 2))
strTxt = strTxt & Cells(lngRow, 2) & ":" & Cells(lngRow, 3) & "-" & Cells(lngRow, 4) & vbLf
lngRow = lngRow + 1
Loop
txt.Text = Left(strTxt, Len(strTxt) - 1)
End Sub