Hello!
How to now if Notepad, let's say test.txt, is open or not?
Also how to close it or any file.
Around internet there are a lot of virtual things as close notepad with VBA,
however, so far I haven't found any working code,
this looks quite nice:
Dim fileToOpen As String
fileToOpen = "C:\test.txt"
Open fileToOpen For Output As #1
Sleep 1000
Close #1
End Sub
However, it does not open test.txt so I don't now could it close it also.
The big question is as the title suggest, how can one know if test.txt is already open?
regards
keymuu
Bookmarks