Excel for Macbook Pro error
Results 1 to 3 of 3

Thread: Excel for Macbook Pro error
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Jun 2013
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Excel for Macbook Pro error

    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

    [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]

  2. #2
    MrExcel MVP mikerickson's Avatar
    Join Date
    Jan 2007
    Location
    Davis CA
    Posts
    22,519
    Post Thanks / Like
    Mentioned
    20 Post(s)
    Tagged
    15 Thread(s)

    Default Re: Excel for Macbook Pro error

    The code uses Windows file path conventions. At the least you need to use Application.PathSeparator rather than "/" in your code.

  3. #3
    New Member
    Join Date
    Jun 2013
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Excel for Macbook Pro error

    Thanks for your prompt reply, however I an a newbie in Macro, If you do't mind, can you revised the Macro to show the changes.

    Again, Thank you so much.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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