Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What's the test for whether a file is currently open (or closed)?
My app writes to a log file, but I don't want to burden the caller with opening the file in the event he never has to write to it. So I want: Dim H As Long Sub Log(Msg as String) If Not IsOpen(H) then Open LogFile For Output As #H Print #H, FileHeader & DateTime Print #H, End If Print #H, Msg End Sub Sub Main Repeat If Not Something Then Log "Oops" End If Until SomethingElse Close #H End Sub So what expression should "IsOpen(H)" be? Thanks. *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
test file - is open? | Excel Programming | |||
VBA Assistance needed to test for open file in a different direct | Excel Programming | |||
Open Test file with VBA with a changing file number | Excel Programming | |||
Open file - How to test the path ? | Excel Programming | |||
Test for Open File | Excel Programming |