View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Christine[_4_] Christine[_4_] is offline
external usenet poster
 
Posts: 1
Default VBA Code to FIND

Hello all, thanks in advance for your assistance.

I am using a macro to look up a value, find that value in another
sheet, then copy from that row to another workbook.

Clear as mud? The problem in, the value will not always be the same.
But the code puts the value, not the fact that I pasted the value,
into the FIND value. See below:

Selection.Find(What:="MI071001", After:=ActiveCell,
LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

The value "MI071001" will not always be the same. I want it to find
the value and paste it into Find each time it runs. Does this make
sense?

Christine