0
テキストファイル内の行を削除すると問題が発生します。ここに私のコードです。私を助けてくれてありがとう。テキストファイル内の行を削除した後に空白を削除するVB6
iFileList = FreeFile
iFileList2 = FreeFile
Open App.Path & "\months\" & gMonth & ".txt" For Input As #iFileList
Do While Not EOF(iFileList)
Line Input #iFileList, sLine
tempHolder2 = Split(sLine, "/")
If Len(sLine) > 0 Then
If gDay = tempHolder2(0) Then
If tempHolder2(1) Like lvAlarm.selectedItem Then
'skip the line
Else
sNewText = sNewText & sLine & vbCrLf
End If
End If
End If
Loop
Close
Debug.Print (sNewText)
iFile = FreeFile
Open App.Path & "\months\" & gMonth & ".txt" For Output As #iFile
'sNewText = sNewText & vbCrLf
Print #iFile, Trim(sNewText)
Close