Selection.Find function and variable problem

i'm trying to finish this macro. the problem is that the varVal is not being recognized by the Selection.Find function. i stepped thru it and the assignment of the string in the varVal is there, but turns up empty in the call up in the Selection.Find.

WHAT AM I DOING WRONG?

thanks!

Sub Macro5()
'
    Dim varVal As String
   
    Sheets("ONE LIST 11-13-2004No Dup's").Select
    Range("B1").Select
    Selection.End(xlDown).Select
    ActiveCell.Offset(1, 0).Activate
    ActiveCell.Offset(0, -1).Activate
   
    varVal = ActiveCell

    Sheets("Export725").Select
    Columns("A:A").Select
   
    Selection.Find(What:=vaVal, After:=ActiveCell, LookIn:=xlValues, LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
        False, SearchFormat:=False).Activate
    ActiveCell.Offset(0, 2).Activate
   
    Range(ActiveCell, ActiveCell.Offset(0, 6)).Select
    Selection.Copy
    Sheets("ONE LIST 11-13-2004No Dup's").Select
    ActiveCell.Offset(0, 1).Activate
    ActiveSheet.Paste
   
End Sub
ironpen45Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ironpen45Author Commented:
btw, this is vba in an excel macro. tia!
0
pratap_rCommented:
umm... you missed the r in varval

    Selection.Find(What:=vaVal, After:=ActiveCell, LookIn:=xlValues, LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
        False, SearchFormat:=False).Activate
    ActiveCell.Offset(0, 2).Activate

your corrected Selection.Find

    Selection.Find(What:=varVal, After:=ActiveCell, LookIn:=xlValues, LookAt _
        :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
        False, SearchFormat:=False).Activate
    ActiveCell.Offset(0, 2).Activate


hehe.. these things happen :-)

prevent these type of errors by using option explicit at the top of your vb file or in options

Have Fun!
Pratap
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.