GANZ PRIMA, wo sind die Punkte für Dich?
Es ist zwar etwas "um die Ecke", aber es geht. Ich lade mir die Standard-Textboxen, die ich dann mit dem neuen Inhalt überschreibe
(siehe Bilder).
-------------------------------------------
Dim Daten(10) As String
Dim txtBx(4) As MSForms.TextBox
-------------------------------------------
Private Sub CommandButton1_Click()
End
End Sub
-------------------------------------------
Private Sub CommandButton2_Click()
Dim n As Integer
For n = 0 To 4
Set txtBx(n) = Controls.Add("Forms.TextBox.1")
txtBx(n).Width = 72
txtBx(n).Left = 186
txtBx(n).Top = n * 24 + 36
txtBx(n).Height = 18
txtBx(n).Enabled = True
Next
Me.Width = 5 * 80 + 10
datei = "C:\Users\............\Test\Daten.txt"
i = 0
Open datei For Input As 1
Do While Not EOF(1)
Line Input #1, Daten(i)
txtBx(i).Text = Daten(i)
i = i + 1
Loop
Close 1
CommandButton3.Enabled = True
End Sub
------------------------------------------
Private Sub CommandButton3_Click()
' Beispiel Dateninhalt Feld 3 lesen
For i = 0 To 4
Daten(i) = txtBx(i).Text
Next
MsgBox (Daten(2))
End Sub
-------------------------------------------
Private Sub UserForm_Initialize()
CommandButton3.Enabled = False
End Sub
Also nochmals, vielen Dank
Str
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP