rudfaden
New Member
- Joined
- Feb 5, 2011
- Messages
- 48
When i use the following code in Excel 2011 for Mac i get runtime Error 1004.
Does anyone have an idea to fix it?
Does anyone have an idea to fix it?
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Msg As String
Dim Ans As Integer
Dim FName As String
Msg = “Would you like to make a backup of this file?”
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbYes Then
FName = "Rud's HD:Users:RudVFaden:Backup:” & ThisWorkbook.Name
ThisWorkbook.SaveCopyAs FName
End If
End Sub