>Hey Jay
>
>I just saw something related in a program I inherited. I think the trick you're looking for is a replacement for CLOSING a file, not opening it.
>
>USE IN (SELECT('Schedule'))
>
>will close schedule if it's open and basically do nothing if it is not open.
That's because you told it to open nothing in the SELECT('Schedule') workarea. You could likewise
USE AnyOtherTable IN (SELECT('Schedule'))
and it would open AnyOtherTable in the workarea SELECT('Schedule') (which would be the first unused workarea if Schedule is not used). Since nothing is stopping us from opening the same table where it was already open...
USE schedule IN (SELECT('Schedule'))
would open Schedule in the workarea SELECT('Schedule').
So it closes and it can also open - that's the dual nature of the USE command, available since dBaseII, IIRC.