rorobear
08-19-2021, 09:51 AM
Hello Everyone,
Wondering if i could get a little help. I'd like to expand the code below. If i have multiple workbooks open (which i'm opening from a userform), I want to be able to chose with workbook to close. I don't want to just close the active book or close all books. I want to modify the code so I get some sort of promt (msgbox maybe) to allow me to chose which workbook I want to close. If anyone can help, I'd be most grateful.
rb
Option Explicit
Sub Close_WorkbookAndSave()
ActiveWorkbook.Close savechanges:=True
End Sub
Wondering if i could get a little help. I'd like to expand the code below. If i have multiple workbooks open (which i'm opening from a userform), I want to be able to chose with workbook to close. I don't want to just close the active book or close all books. I want to modify the code so I get some sort of promt (msgbox maybe) to allow me to chose which workbook I want to close. If anyone can help, I'd be most grateful.
rb
Option Explicit
Sub Close_WorkbookAndSave()
ActiveWorkbook.Close savechanges:=True
End Sub