View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default using range name in Find

Hi All,

I have a range named OMSZ, and I'd like to use this name in Find, but this
line gives an error:
MyVar = ThisWorkbook.Names("OMSZ").Find("StringToSearchFor ", [A1], , ,
xlByRows, xlNext).Row
What is the correct syntax?
The named range is OK, because e.g.
MyRange = ThisWorkbook.Names("OMSZ").RefersTo
gives back the correct range.