M
Matthijs de Z
Hi,
I'm trying to make a macro in VBA for excel to close the sheet/application.
After looking up some codes on the internet, I still get the popup alert
with the question whether I want to save the changes or not.
I've tried all of these codes:
Function activeer()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Call CopySpecificFile
'Call CopyFileType
'Application.ScreenUpdating = True
'Application.DisplayAlerts = True
'Application.Quit
'ThisWorkbook.Close savechanges:=False
'ActiveWorkbook.Close False
'Application.Quit
'Workbooks("kopieer test2.xls").Saved = True
' Application.Quit
'Application.Quit
'Workbooks("kopieer test2.xls").Sheets("blad1").Activate
'ActiveWorkbook.Close SaveChanges:=False
'ThisWorkbook.Saved = True
'ActiveWorkbook.Saved = True
'ThisWorkbook.Close
'Application.Quit
Application.Quit
ActiveWorkbook.Close SaveChanges:=True
End Function
None of them seem to work the way I want. All I want is to close excel
without saving anything. Anybody got an advice?
Best regards,
Matthijs
I'm trying to make a macro in VBA for excel to close the sheet/application.
After looking up some codes on the internet, I still get the popup alert
with the question whether I want to save the changes or not.
I've tried all of these codes:
Function activeer()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Call CopySpecificFile
'Call CopyFileType
'Application.ScreenUpdating = True
'Application.DisplayAlerts = True
'Application.Quit
'ThisWorkbook.Close savechanges:=False
'ActiveWorkbook.Close False
'Application.Quit
'Workbooks("kopieer test2.xls").Saved = True
' Application.Quit
'Application.Quit
'Workbooks("kopieer test2.xls").Sheets("blad1").Activate
'ActiveWorkbook.Close SaveChanges:=False
'ThisWorkbook.Saved = True
'ActiveWorkbook.Saved = True
'ThisWorkbook.Close
'Application.Quit
Application.Quit
ActiveWorkbook.Close SaveChanges:=True
End Function
None of them seem to work the way I want. All I want is to close excel
without saving anything. Anybody got an advice?
Best regards,
Matthijs