View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
kirkm[_6_] kirkm[_6_] is offline
external usenet poster
 
Posts: 156
Default Help with Search Range in Function


I'm sending an argument into a function -

Function Find_Them(Find_Item As Variant, Search_Range As Range,
Optional LookIn As Variant, Optional LookAt As Variant, Optional
MatchCase As Boolean) As Range



The problem is 'Search_Range As Range'.

If I call the function from code behind sheet, all Search_Range
needs is e.g.

? search_range.address
$J$2:$J$8964

and it works.

But if I call the function from a module, it fails because I cannot
figure out how to tell the function what Sheet to use.

Can I include within the Search_Range argument the name of the Sheet?

Thanks - Kirk