#1
|
|||
|
|||
VBA PPT: Read then overwrite specific line in TXT file
Hello. I'm sorry I have no code to offer for this because the solutions I came up with and those I found from searching seemed unworkable for my specific need. I've worked with creating text files; appending them; and reading them in VBA but can't get how to write over a specific line in one. The more I read about it, the more confused I'm getting. Help, please. Thanks.
I have a txt file, "C:\Activity.txt" with the following content: ========================= 1/12/2022 3 2/4/2022 7 2/10/2022 ========================= Based on a choice they made, code captures it within an IF/THEN routine where I need to read/write to that text file... If sType = "regular" then 'Read line #2Elseif sType = "special" then 'Read line #4End If Any help is greatly appreciated!! -Mel Turco |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rename Files in a Folder and Overwrite if File Exists | Jayay159 | Word VBA | 3 | 10-20-2021 11:48 PM |
Error Handler If User Does Not Want to Overwrite File | ChrisOK | Excel Programming | 4 | 04-03-2020 08:31 PM |
After a specific file is closed, Excel asks again if I want to close the same file -- and ruins it | HGilbert | Excel | 1 | 01-24-2017 08:37 AM |
Read only file | NienkeG | Word | 2 | 08-03-2014 03:57 PM |
Word does not ask do i want to overwrite a file on saving a file | sam2149 | Word | 2 | 03-24-2014 04:18 AM |