Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-29-2023, 03:21 AM
MartinGM MartinGM is offline Close file or quit application ? Windows 11 Close file or quit application ? Office 2021
Competent Performer
Close file or quit application ?
 
Join Date: May 2023
Location: England
Posts: 101
MartinGM is on a distinguished road
Default Close file or quit application ?

I would like to create a macro which works as below but I can't quite see how to do it . . .
  • If another Excel workbook is not open, save the active workbook, close it and quit Excel
  • If another Excel workbook is open, save the active workbook and close it - leaving the other workbook(s) open.
I know how to do all of this, except how to detect if another Excel workbook is open.


Thanks for any help
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
The Word userform checkbox (checked/unchecked) is not saved on the Application Quit matapagi2019 Word VBA 3 03-31-2019 02:29 AM
Close file or quit application ? After a specific file is closed, Excel asks again if I want to close the same file -- and ruins it HGilbert Excel 1 01-24-2017 08:37 AM
Opening a MS .dot file through ASP.Net application eljapo4 Word 0 09-14-2012 01:11 AM
EXCEL tries to close a file userman Excel 2 05-31-2012 03:15 AM
Close file or quit application ? Excel 2003 will not terminate with application.quit Peter Schellenbach Excel 12 03-14-2006 05:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft