View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
jjk jjk is offline
external usenet poster
 
Posts: 42
Default "Object Variable or With Block Variable Not Set" error help request

..Row returns a Range object.
Try using set:
Use the .Row property of the range that is returned.
If you declare declare the variables then the VBE will give you
autocomplete options. It really helps in exploring the VBA.

Dim FoundInRow as Range
Set FoundInRow = Worksheets("Classes").Columns(*"C").Find(EnteredCR N,
_
LookIn:=xlValues, lookat:=xlWhole).Row
MsgBox ("FoundInRow = " & FoundInRow.Row)

Regards,
Jayant