excel vba - How to know if a txt file is already open with vba? -


i need open/create txt file excel vba, before opening file need make sure not open.

how can know if it's open, , if so, close before opening again ?

something :

if isopen(file_name)     close(file_name) endif 

unless want re-create same file scratch, if file tests open, why don't use it? if tests not open, open it. then, if doesn't exist create it.

you may clear out text file if open , want restart text instead of overwriting creating file again.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -