Results 1 to 2 of 2
2007-11-14, 15:41 #1
- 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.
' 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"))
stDir = "SDI-SERVERStorageSDI Projects"
stDir = "Sdi-serverstorageSDI Marketing & Proposals"
stDir = "SDI-SERVERStorageOffice InformationTimesheets 2007JEP"
stDir = "Sdi-serverstorageA Transfer Folder"
If Application.Dialogs(xlDialogOpen).Show(stDir & "*.xls") Then
' file opened
' no file opened
2007-11-14, 15:55 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 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.