代码:
Function getValue(pathname, filename, sheet, rng)
If Right(path, 1) <> ":" Then path = path & ":"
Dim rngR1C1, ref As String:
rngR1C1 = Range(rng).Address(, , xlR1C1)
ref = "'" & pathname & "[" & filename & "]" & sheet & "'!" & rngR1C1
getValue = ExecuteExcel4Macro(ref)
End Function