Hello Excel Gurus,
I have a working macro for Windows but when I bought Macbook Pro and use it, I cannot save it and there is an error when I close and save it. Any help would be appreciated. Please see Macro below.
Thank you.
Gemini528
I have a working macro for Windows but when I bought Macbook Pro and use it, I cannot save it and there is an error when I close and save it. Any help would be appreciated. Please see Macro below.
Thank you.
Gemini528
Code:
Sub FileClose()
Dim Backup As String
myFlg = True
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.DisplayFormulaBar = True
Backup = "C:\USERS\PTR\DESKTOP\BACKUP\Kaperahan " & Format(Date, "YYYY-MM-DD") & ".xlsb"
If Len(Dir("D:\", vbDirectory)) = 0 Then
Beep
MsgBox "Please Insert the USB Drive and Try Again!"
Exit Sub
End If
ThisWorkbook.Save
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:=Backup
Application.DisplayAlerts = True
On Error GoTo error_Handler:
error_Handler:
Application.Quit
Application.ScreenUpdating = True
Application.Quit
End Sub
[CODE]