Close Files WHEN Open

J

Jasper

Hello Everybody!

I was wandering if someone could help me with the following:

I have 3 files which open each other allong the way. For example.

File 1
File 2
File 3

Working in File 1; at certain actions File 2 is opened. At other File 3 is
opened.

However, If I want to close, using a macro. I want to save and close all the
files (File 1,2,3) but no other files which might be running. Those anyone
have suggestions? Thanks in Advance!
 
B

Bob Phillips

On Error Resume Next
Workbooks("File1.xls").Close
Workbooks("File2.xls").Close
Workbooks("File2.xls").Close
On Error Goto 0

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Top