ich habe ein kleines Problem.
Ich möchte eine txt-datei über ein Makro auslesen. Das Problem habe ich bereits gellöst ;-) nun möchte ich aber, dass wenn die Exceldatei geschlossen wird und später geöffnet, dass das auslesen noch funktioniert und das bekomme ich nicht hin.
hier einmal mein Code:
Sub einlesen()
Dim StrDaten As String
Dim StrModulNr As String
Dim IntSpalte As Integer
Dim IntZeile As Integer
Open "DateiName.txt" For Input As #1
Do Until EOF(1)
IntSpalte = 1
IntZeile = 1
StrDaten = Input(5, #1)
StrModulNr = StrDaten
If Cells(IntZeile, IntSpalte) = "" Then
Cells(IntZeile, IntSpalte) = StrModulNr
End If
Loop
Close #1
End Sub
Danke für die Hilfe