Essentially "alt-tab" to other spreadsheet with macro, to close it


Posted by John Rouse on July 02, 2001 9:56 AM

how do I close previously opened file, from another file, without having to do anything aside from the macro, bypassing any diologue boxes. essentially alt tabbing, and then closing

Posted by faster on July 02, 2001 10:15 AM

This won't save the workbook being closed.
sidenote: ctrl + tab toggles workbooks within Excel


Sub xyz()
ActiveWindow.ActivateNext
Application.DisplayAlerts = False
ActiveWindow.Close
Application.DisplayAlerts = True
End Sub



Posted by John Rouse on July 03, 2001 8:04 AM

THIS WORKS EXCELLENTLY! WOO! except for a pop up window.... ut NO BOTHER!

Thank you so much. This worked excellently.