Opening a workbook opens two

G

Gustaf

Using Excel 2007. I got this annoying problem from time to time, that when I open a particular workbook, Excel also opens another (also particular) workbook. The first workbook has a lot of VBA code in it, but I don't see anything in the Auto_Open() procedure that could cause another workbook to open. What could cause this and what do you do about it?

Gustaf
 
P

Patrick Molloy

you may have a workbook in excel's start-up folder. Does the VBA call a
function/sub from another workbook?
 
T

Tim Zych

One possible idea:

If the macro workbook (A) is referencing the VBAProject of the other
workbook (B), B will open when A is opened.

This can be seen in the VBE. In the project window of A, there would be a
References treeview. Alternatively, it can be seen in the VBE's Tools ->
References with a check next to the VBA project of B. It may be named
"VBAProject" or something else.
 
G

Gustaf

Tim said:
If the macro workbook (A) is referencing the VBAProject of the other
workbook (B), B will open when A is opened.

This can be seen in the VBE. In the project window of A, there would be a
References treeview. Alternatively, it can be seen in the VBE's Tools ->
References with a check next to the VBA project of B. It may be named
"VBAProject" or something else.

Could have been it, but there's no reference to a particular VBA project in Tools > References. Also, both Xlstart folders are empty. And if I close B, and run or step through the Auto_Open() procedure again, B does not open again! What else can I do to track it down?

Gustaf
 
G

Gustaf

Gustaf said:
Could have been it, but there's no reference to a particular VBA project
in Tools > References. Also, both Xlstart folders are empty. And if I
close B, and run or step through the Auto_Open() procedure again, B does
not open again! What else can I do to track it down?

I noticed that even if I closed all instances of EXCEL.EXE, there were still two running. After closing them in Task Manager, the problem disappeared. Any ideas why it happened?

Gustaf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top