Excel Macro programming
I'm just starting to learn VBA.
I'm trying to write a macro that will close an excel template without saving the sheet. I can make the active sheet close (ActiveSheet.Close), but I get the confirmation window (Yes... No... Cancel) for saving the sheet. I don't want to save. Anyone know how I can add to my macro to automatically close the sheet without saving? I tried ActiveSheet.Close.False and this didn't work. Also, anyone have any good resources to help me learn VBA? Thanks! Kathy |
Excel Macro programming
ActiveWorkbook.Close SaveChanges:=False
-- Regards, Tom Ogilvy Kass wrote in message ... I'm just starting to learn VBA. I'm trying to write a macro that will close an excel template without saving the sheet. I can make the active sheet close (ActiveSheet.Close), but I get the confirmation window (Yes... No... Cancel) for saving the sheet. I don't want to save. Anyone know how I can add to my macro to automatically close the sheet without saving? I tried ActiveSheet.Close.False and this didn't work. Also, anyone have any good resources to help me learn VBA? Thanks! Kathy |
Excel Macro programming
Thanks, Tom. This worked great!
-----Original Message----- ActiveWorkbook.Close SaveChanges:=False -- Regards, Tom Ogilvy Kass wrote in message ... I'm just starting to learn VBA. I'm trying to write a macro that will close an excel template without saving the sheet. I can make the active sheet close (ActiveSheet.Close), but I get the confirmation window (Yes... No... Cancel) for saving the sheet. I don't want to save. Anyone know how I can add to my macro to automatically close the sheet without saving? I tried ActiveSheet.Close.False and this didn't work. Also, anyone have any good resources to help me learn VBA? Thanks! Kathy . |
All times are GMT +1. The time now is 08:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com