This function will do it. Can't remember where I got it from.
Function GetValueFromWB(path, file, sheet, ref)
'Retrieves a value from a closed workbook
'----------------------------------------
Dim strSep As String
Dim arg As String
strSep = "\"
'Make sure the file exists
'-------------------------
If Right(path, 1) <> strSep Then path = path & strSep
If bFileExists(path & file) = False Then
GetValueFromWB = "File Not Found"
Exit Function
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.