Workbook_open Event

B

Bruce Maston

What goes on (if anything) *prior* to the Workbook_open
event? I'm getting a funny "file not found" box popping
up when I try to open my application. I set the debugger
to stop at private sub Workbook_open(), but I only get to
that live *after" I cancel out the "file not found" box.
It's as if whatever is screwing up my code happens before
the code actually starts!
 
F

Frank Kabel

Hi Bruce
Workbook_open is the first event you can process.

What file is not found by Excel (what is the exact error message)?
 
B

Bob Phillips

Hi Bruce,

I recall a post from Chip Pearson some time ago where he suggested that an
Auto_Open macro fires before Workbook_Open. Do you have an Auto_Open macro
by chance?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
G

Guest

Each January, I save off the entries for the preceding
year and blank out the rows of the spreadsheet. Excel
seems to be looking for the file I saved off for last
year. This seems screwy because my code in no way
addresses this file, and the worksheets themselves make no
reference to this saved off file of last year's data.

PS -- In Access, you can get to the code of your
application before actually opening the application. As
such, you can debug it line-by-line from the very start.
But I know of no way to do this in Excel. It seems a
Workbook has to be open before you can put a breakpoint
anywhere. Thus, to get a breakpoint on Workbook_open(), I
put the breakpoint on the line, and then I close the
application. The code will then "hang" at that line when
the application is reopened. The "file not found" box
pops up before the program "hangs" when re-opened.
 
G

Guest

Hi Bob,

Assuming that the Auto_Open macro would be visible in the
list of macros, the answer is no.
 
B

Bruce Maston

Hi Frank,

Thank you for the input. I loaded this add-in, and I'm
working on the problem. You are right. It has to be a
link that is somehow in there.
 
Top