Hey Peter -
Perhaps 's' was not correctly passed from fullname. But if it's correct,
with the project selected can you do this in the immediate window (ie with
a
'phantom' file)
?thisworkbook.name
and go on to set a ref using the debugged string
This sometimes works, but more often not.
Also, if I type the name of the workbook exactly as it appears:
Workbooks("MyPhantomBook.xls").Close
sometimes it closes but more often I get the subscript out of error message.
For both of these cases, it seems the longer I've gone without a restart of
Excel, the less chance the line of code will execute. Sometimes, Excel even
crashes, and if I let it recover and restart, it becomes unstable sooner.
There are other instabilities associated with the phantom VB projects. I
think I am safer just restarting Excel every so often.
You are probably right. But to date haven't noticed problems running that
code, many times with the particular files I mentioned though only a
handful
with other files.
Well, I may just have a more screwed up system than you <g. Including but
not limited to the Office 2007 beta.
Thanks for your suggestions,
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______