I have the following simple code in my program:

Open "myfile.dat" for input as #1
Input #1, var1
Input #1, var2
Close #1

It is causing a "File Already Open Error" but my program MUST have this info refreshed every so often, but only when the File is closed, so not to cause the above error.

How can I detect if the file is open???

Something similar to this:

If FileAlreadyOpen = False then

Open "myfile.dat" for input as #1
Input #1, var1
Input #1, var2
Close #1

Else

MsgBox "File is Open"

End If

Thanks for any suggestions...