ok SO I use a mac, and while I have a windows machine where I could test this I need it to work on a mac because all of my use colleagues mac.
my vb looks like this
Private Function GetValue(path, file, sheet, ref)
' Retrieves a value from a closed workbook
Dim arg As String
' Make sure the file exists
If Right(path, 1) <> "\" Then path = path & "\"
If Dir(path & file) = "" Then
GetValue = "File Not Found"
Exit Function
End If
' Create the argument
arg = "'" & path & "[" & file & "]" & sheet & "'!" & _
Range(ref).Range("A1").Address(, , xlR1C1)
' Execute an XLM macro
GetValue = ExecuteExcel4Macro(arg)
End Function
I've tried direct matching of the file path string and everything and all I get is "File Not Found". any suggestions?
thanks
Bookmarks