Results 1 to 13 of 13

Macro Stops at search

Threaded View

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    49

    Macro Stops at search

    I wrote a macro that stores 2 values from one sheet then in another open worksheet it's supposed to search for one variable then enter the other. But when it gets to the part of the macro where it searches for the right cell it just stops. It doesn't run the search at all and I get no error message. Here's my code, can anyone tell me what I'm missing?

    PS I use the sendkeys application because the names of the reports I use change everytime.

    
    Range("A2").Select
    
    ii = ActiveCell.Value
    
    nn = ActiveCell.Offset(0, 10).Value
    
    Application.SendKeys ("^{TAB}")
    
    Range("A1").Activate
    
    Cells.Find(What:=ii, After:=ActiveCell, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False, SearchFormat:=False).Cells.Activate
            
    ActiveCell.Offset(0, 9).Value = nn
     
    End Sub
    Thanks
    Last edited by imogul; 07-23-2013 at 02:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro stops at colleague but not with me
    By DKAbi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2013, 05:20 PM
  2. macro stops at midnight
    By undeze in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2013, 02:46 AM
  3. search for string stops after sheet 7
    By Jollyfrog in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-02-2010, 12:44 PM
  4. My Macro stops
    By Bobby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2006, 03:10 PM
  5. Macro Help:stops at this line.
    By Andrew T Smith in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-31-2005, 05:06 PM

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