ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to Prompt User to Close After Saving (https://www.excelbanter.com/excel-discussion-misc-queries/149886-macro-prompt-user-close-after-saving.html)

Rutabaga

Macro to Prompt User to Close After Saving
 
Hello All,

I have Office 2003.

I would like to prompt users of a public Excel file to close the file (or
application) after they save it so that when they hit Save, a message box
prompts them to that effect.

Thanks in Advance

Mike

Macro to Prompt User to Close After Saving
 
Copy this into the This workbook Module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "I would like to prompt users of a " _
& "public Excel file to close the file or " _
& "application after they save it so that " _
& "when they hit Save, a message box " _
& "prompts them to that effect."
End Sub

"Rutabaga" wrote:

Hello All,

I have Office 2003.

I would like to prompt users of a public Excel file to close the file (or
application) after they save it so that when they hit Save, a message box
prompts them to that effect.

Thanks in Advance


Mike

Macro to Prompt User to Close After Saving
 
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "I would like to prompt users of a " _
& "public Excel file to close the file or " _
& "application after they save it so that " _
& "when they hit Save, a message box " _
& "prompts them to that effect."
End Sub

"Rutabaga" wrote:

Hello All,

I have Office 2003.

I would like to prompt users of a public Excel file to close the file (or
application) after they save it so that when they hit Save, a message box
prompts them to that effect.

Thanks in Advance



All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com