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

Hi All,
I'd like to understand the difference between these two syntaxes below:

a./ lastcolumn = Cells.Find(What:="*", _
After:=Range("A1"), _
LookAt:=xlPart, _
LookIn:=xlValues, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Column
This one works!

b./ lastcolumn = Cells.Find("*", Range("A1"), xlPart,
xlValues, xlByColumns, xlPrevious, False).Column

This one does not work at the same place in the code, but gives an error
message No. 1004 saying Find property of Class range not accessible!

Regards,
Stefi