View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default find a value in another sheet

Hi

No need to select anything.
Look at this:

With Sheets("a")
Set f = .Cells.Find(what:=zoek, After:=ActiveCell)
If Not f Is Nothing Then
rownr = f.Row
colnr = f.Column
End If

Regards,
Per

On 20 Sep., 15:39, Luc wrote:
following coding works find, however.....

Worksheets("a").select

Cells.Find(What:=zoek, After:=ActiveCell).Activate
* *rownr = ActiveCell.Row
* *colnr = ActiveCell.Column

if I don't use Worksheets("a").select and am located in a different sheet
e.g. worksheets("b").... it doesn't work. *Is there a way to point to a
specific sheet from within the find command no matter in which worksheet you
are located at that time.