+ Reply to Thread
Results 1 to 8 of 8

vba code stops after 3600 rows

  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.

    Please Login or Register  to view this content.
    Last edited by davesexcel; 05-01-2010 at 10:18 AM. Reason: Code tags are required when supplying code, check out the forum rules

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: vba code stops after 3600 rows

    Can't see anything obvious in the code that would stop it running.

    However there is one oversight in your code

    After the the last line insert

    Please Login or Register  to view this content.

    Also there is no need to use select, this will ony slow the process

    Could you post a sample work book to provide a better insight to your problem?

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: vba code stops after 3600 rows

    Perhaps a small sample workbook to see what is supposed to happen when the code is run would help.

  4. #4
    Registered User
    Join Date
    05-01-2010
    Location
    florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: vba code stops after 3600 rows

    I know about the screenupdate. will do.

    here is a sample workbook without the code however.
    Attached Files Attached Files
    Last edited by davesexcel; 05-01-2010 at 04:16 PM. Reason: Quoting Previous Posts are not required

  5. #5
    Registered User
    Join Date
    05-01-2010
    Location
    florida
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: vba code stops after 3600 rows

    PLease us ethis sample workbook i made a correction in the data to be more complete
    Attached Files Attached Files
    Last edited by davesexcel; 05-01-2010 at 04:15 PM. Reason: Quoting previous posts are not required

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: vba code stops after 3600 rows

    Got a copy of your w/book.
    Wont be on line again until 4 May

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: vba code stops after 3600 rows

    Your example does not appear to match the code...nothing happens when the macro is run.
    Why would you supply a sample workbook without the code?

    Column 8 and Column 10 are two different types of data, nothing will ever happen when you run the code.
    Last edited by davesexcel; 05-01-2010 at 04:24 PM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: vba code stops after 3600 rows

    Your example workbook is useless to find the error. There isn't sufficient rows to find an error after 3600

    LastRow finds the last used cell in Column A, which only has one cell with data

    I've attempted to at least tidy up your code & make it more efficient, note writing the original code in an earlier version, your LastRow could fail because you search up from 65536, this number could be much greater in 2007

    Also any variables dealing with rows or columns should be declared as Long
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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