View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Michl John Michl is offline
external usenet poster
 
Posts: 81
Default Workbook reopens after close

I have a some code that uses GetOpenFilename to create an array of
filenames. Then one by one, the file is opened and a range is copied
to the orginal master file. After the copy procedure, the file is
closed and the next one is opened. This procedure seems to work ok but
after it completes, all of of the files seem to open up again.

Note the secondary files are copies of the master file that have been
sent to others for data collection. Therefore, they contain the same
VBA code as the master file. I have a feeling that the presense of
identical VBA code in these files may be causing the problem. Any
chance the macro is getting confused and picking up execution in one of
the other files?

Here's a simplified version of my code. When I run it, I check the
task bar at the MsgBox and have confirmed the secondary files are no
longer loaded. Immediately after clicking ok, those files are
reopened.

Help.

- John