office:mac 2011 "SaveCopyAs Error 1004

Mcmntb

New Member
Joined
Dec 9, 2010
Messages
2
I've been using the following Mac Excel Office 2008 macro SUCCESSFULLY (for years):

Sub Auto_Open()
With ActiveWorkbook
.SaveCopyAs .FullName & ".Backup:" & Format(Now, "YYYY_MM_DD_HH_MM_SS")
End With
End Sub

to save a backup copy in the files' parent directory in a filename.backup folder with a date & time stamp.

Of course the backup folder exists.
Suddenly when going to Office:Mac Excel 2011 I get an error message as follows:

Run-time error '1004':
Method 'SaveCopyAs' of object '_Workbook' failed

This is a really big problem as ALL my Excel files have this. I would greatly appreciate any/all help!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Does this help?

Code:
Sub Auto_Open()
    Dim FileName As String
    With ActiveWorkbook
        FileName = Left(.FullName, InStr(1, .FullName, ".xls") - 1)
        .SaveCopyAs FileName & ".Backup:" & Format(Now, "YYYY_MM_DD_HH_MM_SS")
    End With
End Sub
 
Upvote 0
I see where you were trying to go.
No-but it does create a new error on the FileName= line of:

Run-time error '5'.
Invalid procedure call or argument

I had already suppressed the extension as the filename. There is none, even hidden.
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,454
Members
448,898
Latest member
drewmorgan128

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top