View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default access cell in other workbook

OK then, here is a VBA solution with a UDF:

Function RemoteRef(wbk As String, sht As String, rng As String)
Dim oApp As Excel.Application
Dim oWbk As Excel.Workbook
Dim oSht As Excel.Worksheet

Set oApp = CreateObject("Excel.application")
Set oWbk = oApp.Workbooks.Open(wbk)
Set oSht = oWbk.Sheets(sht)
RemoteRef = oSht.Range(rng)
End Function

The function can then be called like:

=remoteref("d:\vezerides\excel techniques\strange
sort.xls","sheet2","a1")

Does this help?
Kostis Vezerides


Glynn Taylor wrote:
Thank you

I thought of this solution but was hoping it would be possible without
opening the other workbook.

Thanks once again for your response

"vezerid" wrote: