ich möchte gern die aktive Mappe beim Start als Kopie "xyz.tmp" ablegen. Mit "filecopy" tritt (wie vorhergesagt) ein Zugriffsfehler (Laufzeitfehler 70) auf.
Geht das überhaupt, was ich will, und wenn ja, wie?
Vielen Dank vorab.
Gruß
Wolfram
Private Sub Workbook_Open()
Dim FS As Object
Set FS = CreateObject("scripting.filesystemobject")
FS.copyfile ThisWorkbook.FullName, "c:\temp\xyz.tmp", True
Set FS = Nothing
End Sub
Option Explicit
Private Sub Workbook_Open()
Dim strPfad As String
strPfad = ThisWorkbook.Path & "\xyz.tmp"
ThisWorkbook.SaveCopyAs strPfad
End Sub