Excel tries to reopen the file

  • Thread starter Thread starter Walt Weber
  • Start date Start date
W

Walt Weber

Hi,

On opening a file that includes an Auto_Open VBA procedure
(There is no Workbook_Open procedure), just before
finishing the procedure, or maybe just after, Excel tries
to reopen the file. Since I can see on screen that the
custom menu is loaded, I know it's at least very near the
end of the Auto_Open procedure.

Dialog box contents are:
"Microsoft Excel" in dg box bar
'Filename' is already open. Reopening will cause any
changes you made to be discarded. Do you want to
reopen 'Filename'?
'YES' and 'NO' buttons at bottom

I 'NO' is chosen all works fine. If 'YES' is chosen, the
file is reopened, then all works fine. This only occurs
on the first opening; hence it's not a loop of continually
reopening.

This problem seems to only happen while using Windows
NT4.0 SP5 and Excel 2000. And, it happens if the file is
double clicked from within Windows Explorer. Opening
from the Excel 'Open' dialog box is no problem. A
shortcut pointed to just the file has the problem, but a
shortcut pointed first to Excel, then a space, and then
the file works fine.

I don't know if this is Windows, Excel, or the VBA
procedure. Any ideas.

Thanks,
Walt
 
Hi,

It's Walt again.
Further thoughts:

It's Windows NT 4.0 Workstation sp5.

This is a file used in an application as a control file
(First to open). Aside from storing a couple dozen
parameters in cells on 1 worksheet, it has 4 userforms
(None invoked via the Auto_Open as long as the expiration
date of 9/1/04 isn't passed) and about 12 code modules
(None especially big, just convenient). It's about 400K
in size.

I don't have access to a full universe of the possible
combinations of Windows and Excel versions, so the problem
may not be unique to WinNT4.0 and Excel 2000. This
machine I'm using is Win98 and the problem does not occur
with either Excel 2000 or 2002 (Since the application is
dependent on XL2000 and forward capabilities, I have not
looked at prior versions).

And, placing a msgbox as the last line in Auto_Open
procedure prior to 'End Sub', it displays prior to the
reopen dialog box. I think this precludes the
possibility of something in the procedure being the
culprit.

There are no buttons on the 1 worksheet or the custom
commandbar (Menu). The menu has only popup items
referenced to internal module procedures. So, I don't
think there's a pathing problem involved.

Help here will be greatly appreciated!

Best Regards,
Walt
 
Back
Top