+ Reply to Thread
Results 1 to 6 of 6

Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

  1. #1
    Registered User
    Join Date
    04-02-2008
    Posts
    59

    Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

    I am creating a macro that will pull data from multiple sheets and compile into one master sheet. I keep getting an error and I am not sure why. One minute it works and the next minutre it dosen't. Here is my code.....

    Please Login or Register  to view this content.
    After it goes to do the second line of paragraph of code, it stops on the line...

    Please Login or Register  to view this content.
    I can then change ("A65536") to + or - 1 number on both the first and second paragraph and it will work, but if I close the workbook and open it again, It gives me an error message again. Why is this happening??????

    Please Help! Thanks in advance for your help! Lukas
    Last edited by lukasj13; 09-30-2010 at 08:50 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

    Your profile does not reveal the version of XL you are using, nor does your code have any comments. You appear to be trying to insert a row past the bottom of the worksheet

    Is that true?
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    04-02-2008
    Posts
    59

    Re: Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

    Sorry for the missing info. I am using Microsoft Excel 2003. The goal is to find the first row down from the top without data in column A, then, insert the copied data.


    Thanks!

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

    I still don't quite understand; however, if your sheet has blank rows between used rows you can use something like:
    Please Login or Register  to view this content.
    But if you are trying to find the last used row, then use:
    Please Login or Register  to view this content.

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

    What is the actual error?
    Remember what the dormouse said
    Feed your head

  6. #6
    Registered User
    Join Date
    04-02-2008
    Posts
    59

    Re: Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"

    Thanks for all of your help and sorry for the confusion. I have found another way of doing it that will work everytime.

    Basically what I was trying to do was have a master project pipeline workbook with data from 4 compiled into one. So for this macro to work, you would open the master and the 4 individuals pipelines. Once this is done (Ihave attached the macro that I has writing to a button) all that you would have to do to pull data from the 4 sheets would be to click a button. I was trying to consecutivly paste the data at the bottom, and looking for the last cell with data in it everytime. I was looking at this sheet for to long and relized that the answer was simple since A10 is always the same paste from that....Duh.

    Since you guys took the time out of your day to try to answer my question, I thought that I owed you an explanation of what I was trying to do. So thanks for your help and "you" are what makes this site great!

+ 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