J
JanB
Hope somebody is able to help me on this small problem.
I am trying to return a cellvalue from a closed workbook using a
function.
The code that I've used is as follows:
Function filref(Fil As String, Ark As String, Celle As String) As
String
Dim txt As String
txt = "+'S:\B\HYT\12 linien\" & "[" & Fil & ".xls]" & Ark & "'!" &
Celle
filref = Application.ExecuteExcel4Macro("txt")
End Function
In the cell that should return the value then contains:
=filref("Amager","Brug","B2")
The result in the cell is: #Value!
Could it be that the ExecuteExcel4Macro is not installed or should the
function in some way be activated and how could this be done.
Regards
JanB
I am trying to return a cellvalue from a closed workbook using a
function.
The code that I've used is as follows:
Function filref(Fil As String, Ark As String, Celle As String) As
String
Dim txt As String
txt = "+'S:\B\HYT\12 linien\" & "[" & Fil & ".xls]" & Ark & "'!" &
Celle
filref = Application.ExecuteExcel4Macro("txt")
End Function
In the cell that should return the value then contains:
=filref("Amager","Brug","B2")
The result in the cell is: #Value!
Could it be that the ExecuteExcel4Macro is not installed or should the
function in some way be activated and how could this be done.
Regards
JanB