ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   open for append (https://www.excelbanter.com/excel-programming/298513-open-append.html)

Mark[_17_]

open for append
 
Hi,

I use follow code for append date in file "date.txt":

Open ThisWorkbook.Path & "\date.txt" For Append As #1
Print #1, Now
Close #1

VBA append each date in next below row.
How append date (now) always in the first row, that is
early date will be in follow rows.

Please me resolve this problem.

Kindly regards
Mark

Tom Ogilvy

open for append
 
I don't believe there is any option that will support this. A possible work
around: You would need to write you date and then write data in the existing
file to the file with the date. Delete the original and rename the new one.

You could write the new date in a separate file, then use the "DOS" copy
command to append the two files.
--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
Hi,

I use follow code for append date in file "date.txt":

Open ThisWorkbook.Path & "\date.txt" For Append As #1
Print #1, Now
Close #1

VBA append each date in next below row.
How append date (now) always in the first row, that is
early date will be in follow rows.

Please me resolve this problem.

Kindly regards
Mark




Mark[_17_]

open for append
 
Hi Tom!
Mayby this action can do on excel file eg. date.xls
Is there an easy code?
Supportive question: Can work (write, read) on files *.xls
without open it.

Best Regards
Mark


-----Original Message-----
I don't believe there is any option that will support

this. A possible work
around: You would need to write you date and then write

data in the existing
file to the file with the date. Delete the original and

rename the new one.

You could write the new date in a separate file, then use

the "DOS" copy
command to append the two files.
--
Regards,
Tom Ogilvy

"Mark" wrote in message
...
Hi,

I use follow code for append date in file "date.txt":

Open ThisWorkbook.Path & "\date.txt" For Append As #1
Print #1, Now
Close #1

VBA append each date in next below row.
How append date (now) always in the first row, that is
early date will be in follow rows.

Please me resolve this problem.

Kindly regards
Mark



.



All times are GMT +1. The time now is 10:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com