• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Is it possible to create a "Save" macro?

Eloise T

Active Member
I have a 20 Mb and growing spreadsheet that takes about 10 minutes to save. I would like a macro that when ran, will simply save the current spreadsheet/workbook and upon completing the "save," will beep or play a tune so that I can visit the lunch room or coffee pot while waiting and listen for the "noise" indicating it's done.
Here's what I've gleaned from the Internet but it beeps virtually instantly....and doesn't update the date and time of the file.

Code:
Sub Save_Workbook()
    Dim Wkb As Workbook
    Set Wkb = Workbooks.Add
    Wkb.Save
'3 BEEPS--------------------------------------------------------------------------------------------
    Beep
'   Pause a second before engaging the next Beep so they don't run together and sound like only one Beep.
'                                   hrs:mi:secs
    Application.Wait Now + TimeValue("0:00:01")
    Beep
'   Pause a second before engaging the next Beep so they don't run together and sound like only one Beep.
    Application.Wait Now + TimeValue("0:00:01")
    Beep
End Sub
 
Last edited:

AlanSidman

Well-Known Member
Does this work for you? Don't see where you wish the date and time to update? Somewhere in the file?

Code:
Option Explicit

Sub Save()
    Dim wb As Workbook
    Set wb = ThisWorkbook
    wb.Save
    Beep
End Sub
 

shrivallabha

Excel Ninja
Or you could keep an event code in ThisWorkbook module:
Code:
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Beep
End Sub
 
Top