Results 1 to 5 of 5

Thread: Application Object In Access

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Application Object In Access

    I have a routine that I run in the On Open event in Excel. It creates a backup of the file with the came name, directory, etc. but as a Date and Time to the file name. This is a very handy way "for me" to recovery from my self imposed disasters, I am supposed to put the code in the text area. I am not sure where that is. Not finding that I will carefully submit my current Subroutine, The issue that I am having is with With.ThisWorkBook and Application.WorksheetFunction. What are the corresponding values for Access. I have found where to put the code, I now just need to know what code to put there.

    Please explain what I need to do to get to the Text Area or whatever,
    here is the code:

    Private Sub Workbook_Open()
        Dim sFileName As String
        Dim sDateTime As String
        With ThisWorkbook
            sDateTime = " (" & Format(Now, "yyyy-mm-dd hhmm") & ").xlsm"
            sFileName = Application.WorksheetFunction.Substitute (.FullName, ".xlsm", sDateTime)
            .SaveCopyAs sFileName
        End With
    End Sub
    Thank you for any help you might provide and also "tell me where to go" on the Text Area feature.
    DannyDont
    Last edited by Aussiebear; 03-28-2025 at 07:42 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •