Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you talking about a workbook file (as Mike understood) or a text file
(as I understood). If the latter are you talking about opening the textfile in Excel, some text editor or with the Open filenumber statement Regards, Peter T "Jim Luedke" wrote in message ... Thanks both for reply. *** Peter: My VBA function is the only entity that ever opens the file. So my question is, and I probably should've been more explicit: What is the test for whether a file, *which only you yourself ever open, inside VBA*, is currently open? *** Mike: Thanks very much for code. I'll give it a try. But, are you saying that VBA has no expression telling you whether a file *it itself* opened, is open or not? That seems odd to me. Somewhere along the line I got the impression that you could, maybe, test the file handle or something. If H is the handle, does something like this work? If H = 0 then IKnowThatFileIsClosed = True End If On the other hand, when I put a trace on: Close #H it seems that the value of H doesn't change, i.e. become 0, on closing. I thought it did. So I must be all wet. Thanks much again. *** |
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 |