Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gentlemen,
Is there any VBA command that avoid the Message " Do you want save...... YES NO CANCEL" when I am using the command" ActiveWindow.Close. This message make my macro be interrupted. Similar is the message that appear when do a copy and I close the file, " There is a large amount of information on Clipboard......". I want to avoid this kind of message. Thanks Rubens ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To avoid "Do you want to save"...
Application.DisplayAlerts = False ActiveWindow.Close To avoid the clipboard message... Application.CutCopyMode = False -- Dianne In , raraujo typed: Is there any VBA command that avoid the Message " Do you want save...... YES NO CANCEL" when I am using the command" ActiveWindow.Close. This message make my macro be interrupted. Similar is the message that appear when do a copy and I close the file, " There is a large amount of information on Clipboard......". I want to avoid this kind of message. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Avoid message.
Application.DisplayAlerts = False 'Your code here. Application.DisplayAlerts = True ---------------------------------------------------------------- Clipboard warning. After the paste, Application.CutCopyMode - False HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- Gentlemen, Is there any VBA command that avoid the Message " Do you want save...... YES NO CANCEL" when I am using the command" ActiveWindow.Close. This message make my macro be interrupted. Similar is the message that appear when do a copy and I close the file, " There is a large amount of information on Clipboard......". I want to avoid this kind of message. Thanks Rubens |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rubens,
If you want the workbook to be saved before closing, use Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Save End Sub If you don't want it saved, use Private Sub Workbook_BeforeClose(Cancel As Boolean) ActiveWorkbook.Saved = True End Sub Put this in the ThisWorkbook code module. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "raraujo" wrote in message ... Gentlemen, Is there any VBA command that avoid the Message " Do you want save...... YES NO CANCEL" when I am using the command" ActiveWindow.Close. This message make my macro be interrupted. Similar is the message that appear when do a copy and I close the file, " There is a large amount of information on Clipboard......". I want to avoid this kind of message. Thanks Rubens ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Cutcopymode = False
ActiveWindow.Close SaveChanges:=True or make it false if you don't want to save changes). -- Regards, Tom Ogilvy "raraujo" wrote in message ... Gentlemen, Is there any VBA command that avoid the Message " Do you want save...... YES NO CANCEL" when I am using the command" ActiveWindow.Close. This message make my macro be interrupted. Similar is the message that appear when do a copy and I close the file, " There is a large amount of information on Clipboard......". I want to avoid this kind of message. Thanks Rubens ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Launch Macro in Access via Macro running in Excel??? | Excel Programming |