Results 1 to 8 of 8

vba code stops after 3600 rows

Threaded View

rdhdsandi vba code stops after 3600 rows 05-01-2010, 10:11 AM
Marcol Re: vba code stops after 3600... 05-01-2010, 10:44 AM
rdhdsandi Re: vba code stops after 3600... 05-01-2010, 11:45 AM
rdhdsandi Re: vba code stops after 3600... 05-01-2010, 11:49 AM
davesexcel Re: vba code stops after 3600... 05-01-2010, 10:46 AM
Marcol Re: vba code stops after 3600... 05-01-2010, 11:49 AM
davesexcel Re: vba code stops after 3600... 05-01-2010, 04:18 PM
royUK Re: vba code stops after 3600... 05-02-2010, 03:40 AM
  1. #1
    Registered User
    Join Date
    05-01-2010
    Location
    florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    vba code stops after 3600 rows

    I have code to place items from one apreadsheet to another. It has worked for a couple of years. Now it doesn't pick up any rows beyon 3689. I have a table with 4000 rows and 21 columns. the code moves only 3 of the columns from "MASTER" to "COMPLIANCE" by row based on a date and an if then .

    Is there an error in the Code? and why would it stop at that row?

    Here is the code.

    Sub MoveItCOMPLIANCE()
      
        Application.ScreenUpdating = False
        Sheets("COMPLIANCE").Select
        Range("B3:L7000").Select
        Selection.ClearContents
        Range("B3").Select
        Sheets("Master").Select
        Dim Lastrow As Long, r As Integer, c As Integer
        Lastrow = Sheets("Master").Range("A65536").End(xlUp).Row
        
        For r = 1 To Lastrow
           'FIRST IF ID THE DATE
           'SECOND IF IS THE BLANK APPT CELL
           
           If Sheets("Master").Cells(r, 5) = Range("A1") Then
           If Sheets("Master").Cells(r, 8) = Sheets("Master").Cells(r, 10) Then
                Sheets("COMPLIANCE").Cells(r, 3) = Sheets("Master").Cells(r, 7).Value
                Sheets("COMPLIANCE").Cells(r, 4) = Sheets("Master").Cells(r, 3).Value
                Sheets("COMPLIANCE").Cells(r, 2) = Sheets("Master").Cells(r, 2).Value
                
       
        End If
             End If
        
        Next r
        
        Sheets("COMPLIANCE").Select
        Range("B3:L20000").Select
        ActiveWindow.ScrollRow = 1
        Selection.Sort Key1:=Range("B3"), Order1:=xlAscending, Key2:=Range("D3"), Order1:=xlAscending, Header:=xlGuess, _
            OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
       
        
        Range("C2").Select
        
        
        
     
    End Sub
    Last edited by davesexcel; 05-01-2010 at 10:18 AM. Reason: Code tags are required when supplying code, check out the forum 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