I want to delete the record from CSV after reading that row. Please guide me how can I achieve this.
I have found this piece of code :
Sub ImportCSVFile(ByVal filePath As String, ByVal ImportToRow As Integer, ByVal StartColumn As Integer)
Dim line As String
Dim arrayOfElements
Dim element As Variant
Open filePath For Input As #1 ' Open file for input
Do While Not EOF(1) ' Loop until end of file
Line Input #1, line
Debug.Print line
arrayOfElements = Split(line, ";") 'Split the line into the array.
Loop
Close #1 ' Close file.
End Sub
It is reading the CSV file and working as required. Can someone please advise that how can I delete the row in CSV file after reading it ?