The Andrew N. Wiggins Consultancy

Contact me at webmaster@anw.biz

Experimental Site

 

This site designed by Byg Software Ltd

 

The ANW.BIZ Home Page
Up

Save and Backup

 
This saves the workbook with a date and timed archive copy.
 
'' ***************************************************************************
'' Purpose  : Generate history
'' Written  : 29-Oct-2000 by Andy Wiggins - Byg Software Ltd
''
Sub SaveBackup()
Const ctTitle = "Archive Save"
Dim lStr_NewName As String

    lStr_NewName = ThisWorkbook.Path & "\" & ThisWorkbook.Name & " " & Format(Now, "yyyymmdd_hhmmss")
 
    With ThisWorkbook
    
        If vbYes = MsgBox(lStr_NewName, vbYesNo + vbCritical, ctTitle) Then
            .SaveCopyAs lStr_NewName
            .Save
        Else
            MsgBox "Not saved", vbOKOnly + vbInformation, ctTitle
        End If
        
    End With

End Sub
   

Published: 17 January 2004
Last edited: 19 May 2008 16:43