Workbook.Open doesn't leave an open Workbook
Your code worked ok for me.
Guess #1. Any chance that that TS was opened, but was hidden (or you didn't
notice it)?
Guess #2. Any chance that you have your own variable named Err?
Mac Lingo wrote:
My Code:
TS = Directory & File_Name
On Error Resume Next
Workbooks.Open TS
If Err Then
Call MsgBox("Could not open " & TS & ", " & Err)
End If
After this runs, there is no Error Message, but there is no Workbook open
either.
This code works if I put in Workbook_Open, but not if I use it in a normal
Function call.
Any idea why it works in one place and not in another?
Thanks,
Mac
--
Dave Peterson
|