E
edluver
i am sorry, the code in the original post is not correct, it should be this:
Function GetValuesFromAClosedWorkbook(fPath As String, _
fName As String, sName, cellRange As String)
With ActiveSheet.Range(cellRange)
.FormulaArray = "='" & fPath & "\[" & fName & "]" _
& sName & "'!" & cellRange
.Value = .Value
End With
End Function
Sub test1()
GetValuesFromAClosedWorkbook "E:", "Book1.xls", "Sheet1", "A4:J4"
End Sub
sorry for the confusion.
Function GetValuesFromAClosedWorkbook(fPath As String, _
fName As String, sName, cellRange As String)
With ActiveSheet.Range(cellRange)
.FormulaArray = "='" & fPath & "\[" & fName & "]" _
& sName & "'!" & cellRange
.Value = .Value
End With
End Function
Sub test1()
GetValuesFromAClosedWorkbook "E:", "Book1.xls", "Sheet1", "A4:J4"
End Sub
sorry for the confusion.