View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jens Nielsen Jens Nielsen is offline
external usenet poster
 
Posts: 1
Default Error if text not found

I am trying to get a Excel-macro to lookup text in a cell on one worksheet
and find the same text in another worksheet.
It works fine until it reaches a text that can't be found on the other
worksheet.

This is my code
Dim Celle As String

Celle = ActiveCell
Sheets("Stykliste").Select
Cells.Find(What:=Celle, After:=[A1], SearchOrder:=xlByRows,
SearchDirection:=xlNext).Select


I get a "Run-time Error 91"

What am I doing wrong?

Regards
Jens Nielsen