Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am modifying a csv file from VBA and am adding a line to the beginning of file which is working well. However, I'd like to delete teh first line of the csv file before adding the line. I have many files so it is not efficient to open them from excel. I'd like to use the VBA Put, Print, Write statements etc. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I presume you are using the code that RB Smissaert posted in response to
your "how do I add a line" request. If so, add this line immediately after you load the file into the FileContents variable (that is, make the following the next line after the **first** Close #hFile statement... FileContents = Mid$(FileContents, InStr(FileContents, vbCrLf) + 2) Rick "JA" wrote in message ... I am modifying a csv file from VBA and am adding a line to the beginning of file which is working well. However, I'd like to delete teh first line of the csv file before adding the line. I have many files so it is not efficient to open them from excel. I'd like to use the VBA Put, Print, Write statements etc. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? | Excel Worksheet Functions | |||
How do I delete every other line in an Excel document with over 3. | Excel Discussion (Misc queries) | |||
Delete a line in a text file | Excel Programming | |||
Delete a line in text file | Excel Programming | |||
Delete a line of text file | Excel Programming |