Excel Vba Close Workbook Dont Save. Computergaga. • Auto run vba project When an Excel Workbook is opened. With VBA, you can do a lot of stuff with a workbook object - such as open a specific workbook, save and close workbooks, create new workbooks, change the workbook properties, etc.
Public Sub IsWorkBookOpen(strWorkbookName As String) On Error Resume Next 'Checks to see if the workbook is open, and if not, closes it 'saving any changes Dim objExcel As Excel.
Computergaga. • Auto run vba project When an Excel Workbook is opened.
I want to close this workbook with the close X button without saving changes while not affecting other opened worksheets. I managed to hack together the code below by recording myself and Googling the rest as I needed to save several workbooks from the one and automatically add the date. Save As Dialog to Save a Workbook in Excel VBA.








