View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Find value with the help of macro.

I'm guessing you recorded a macro when you tried to find something. And in that
recorded code, there was a .activate line.

If the value wasn't found, then the .activate will fail.

Dim FoundCell as range
set foundcell = activesheet.range("a1:b99").find(....)

if foundcell is nothing then
msgbox "not found"
else
foundcell.select
end if

Heera wrote:

Hi,

Normally in excel we find a value with the help of ctrl+F and then
find it.

But when i recored a macro to do the same it is giving an error can
some help me to solve this issue.

All the values in my sheet are unique value.

Regards

Heera


--

Dave Peterson