Results 1 to 6 of 6

Excel 2003 VBA: Find Method with Variable

Threaded View

  1. #1
    Registered User
    Join Date
    02-15-2011
    Location
    Bandera, Texas
    MS-Off Ver
    Excel 2003
    Posts
    5

    Excel 2003 VBA: Find Method with Variable

    My problem is with the line beginning "Selection.Find."

    I want it to paste the clipboard contents into the search box, but it's
    remembering the specific value used when I set up the macro (i.e. copied the
    keystrokes).


        Selection.Copy
        Windows("Master TEST.xls").Activate
        Columns("D:D").Select
        Selection.Find(What:="359", After:=ActiveCell, LookIn:=xlFormulas,
        LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
            MatchCase:= _
            False, SearchFormat:=False).Activate
        ActiveCell.Offset(0, 1).Select
        Range(ActiveCell, ActiveCell.Offset(0, 1)).Copy
        Windows("New.xls").Activate
        ActiveCell.Offset(0, 1).Select
        ActiveSheet.Paste
        ActiveCell.Offset(1, -1).Select
    Thanks for any help
    Last edited by DrNyet; 02-18-2011 at 08:41 AM. Reason: add code tags for newbie PM rules

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1