Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Thanked 0 Times in 0 Posts

    excel for mac file open macr (excel 2004)

    I would like to have a macro in Excel 2004 for Mac that uses a input box. The input box would list the subdirectories with which I am currently working. When a letter is selected, Excel opens that directory and stops. I then select the Excel file and open it. The following is a Win Excel macro that did that. I have dropped all but the first four selections to make it shorter.

    What do I need to do to make it work with Mac? Thanks.

    Sub opensezme()
    ' Keyboard Shortcut: Ctrl+k

    Dim stDir As String
    Select Case UCase(InputBox("Enter a letter" & vbNewLine & "A S:SDI Projects" & vbNewLine & "B S:SDI Proposals" & vbNewLine & "C S:timesheets" & vbNewLine & "D S:A Transfer Folder", "Select Directory on D: Drive"))
    Case ""
    ' cancelled
    Exit Sub
    Case "A"
    stDir = "SDI-SERVERStorageSDI Projects"
    Case "B"
    stDir = "Sdi-serverstorageSDI Marketing & Proposals"
    Case "C"
    stDir = "SDI-SERVERStorageOffice InformationTimesheets 2007JEP"
    Case "D"
    stDir = "Sdi-serverstorageA Transfer Folder"
    End Select
    If Application.Dialogs(xlDialogOpen).Show(stDir & "*.xls") Then
    ' file opened
    ' no file opened
    End If
    End Sub



  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: excel for mac file open macr (excel 2004)

    I haven't used a Mac for years, but since Mac OS is based on Unix, it probably uses forward slashes instead of backslashes in the path, and no double slash at the beginning of the path.

Posting Permissions

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