View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Pass a range to a method?

It doesn't, for the reasons you state. See my reply.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Lucifer" wrote in message
...
Frank,

I'm rather suprised this works. As I understand it the Range("").Name

method returns a Name object. What I want to do is interrogate the Name
object and take a different path depending upon the name of the range passed
into the function.

Why doesn't this compile:

Function Test(retireDate As Range) As Integer
Dim foo As Name
foo = retireDate.Name
Debug.Print foo
End Function

So in my example, foo is a Name object and range.Name should return a Name

object..... Confusing....