+ Reply to Thread
Results 1 to 2 of 2

Error '1004', application/object error, Do Loop

Hybrid View

farzyness Error '1004',... 01-25-2011, 11:48 AM
farzyness Re: Error '1004',... 01-25-2011, 12:03 PM
  1. #1
    Registered User
    Join Date
    08-05-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    36

    Error '1004', application/object error, Do Loop

    Hi all,

    I'm getting an error on the Do While line when trying to run this macro. The vlookup field is being returned with a value that exists in the list in which the loop is trying to run, yet it doesn't find a match.

    Any help would be fantastic. Thank you!
    Dim x As Long
        
        x = 0
        
        Range("A40") = TM.Value
        
        Range("B40") = Application.VLookup(Cells(40, 1), Sheets("MISC").Range("A1:B200"), 2, False)
        
        Sheets("CUSTOMER").Activate
        
        Do While Cells(1 + x, 7).Value <> Sheets("TM Call Report").Cells(40, 2).Value
        
            x = x + 1
            
        Loop
    Last edited by farzyness; 01-25-2011 at 12:03 PM. Reason: Solved Problem.

  2. #2
    Registered User
    Join Date
    08-05-2010
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    36

    Re: Error '1004', application/object error, Do Loop

    I have fixed the problem.

    You have to be sure to reference the loop value Cells(1+x, 7) to the proper worksheet. Labeling it as:

    Sheets("CUSTOMER").Cells(1+x, 7) fixed the problem.

+ Reply to Thread

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