How can i update text file on C:

gstylianou

Registered User.
Local time
Today, 21:39
Joined
Dec 16, 2013
Messages
359
Dear friends,


I need your help in the following problem.
I have a text file (Slash.txt) which is stored in on C:\ ProgramData\Dash\Slash.txt. I'm using this file in order to store some numbers (usually max 15digits). I can do this using vba code (example attached).

What is the problem:
If the file exist on path C:\ ProgramData\Dash\Slash.txt i cannot update the data...because something going wrong.. If the file does not exist, everything its ok. Vba creates new folder into path as well as new text file into this.

So, i need help on how can i update the existing txt file with new data, but i need also a way using a command button to delete this text file if i wanted..

Your help is very important because i'm stacked several days ago...

Thanks
 

Attachments

Not sure I understand...

Do you want to check if the file is there and if it's there overwrite it with the new file but if it's not there create it?
 
Not sure I understand...

Do you want to check if the file is there and if it's there overwrite it with the new file but if it's not there create it?

Hi Gina,

Exactly this...can you help?

Thanks
 
Hmm, I looked at your other post and it appears you got the answer. Stick to that one!
 

Users who are viewing this thread

Back
Top Bottom