LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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)


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function with parameter "as range" Mike Archer Excel Programming 4 February 2nd 06 05:32 PM
Format when sending a range as parameter to a custom function George Furnell Excel Programming 2 December 1st 05 05:22 PM
user defined function receiving a range as parameter Marc Excel Programming 7 October 14th 05 07:50 PM
Excel2000: Reading values from range, passed to function as parameter using an expression Arvi Laanemets Excel Programming 3 April 29th 05 02:34 PM
Defining new function with cell range parameter NormD Excel Programming 2 March 1st 05 03:21 PM


All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"