View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nox nox is offline
external usenet poster
 
Posts: 2
Default function with a range as a parameter

Hi all,

I am trying to write a function that uses a range as a parameter (see below)

Function Param(MyRange As Range, Aline As Integer) As Integer
Param = 5
End Function

The problem is that when the range specifies cells on a closed workbook,
the function dispays an error (#VALUE)
If the range corresponds to an open workbook there is no error.

Is it possible to get back a Range on a closed workbook (like the function
VLOOKUP does) ?
if yes how ?

Thanks

Jim.

(I am using Excel 2000)