+ Reply to Thread
Results 1 to 5 of 5

Help regarding copying data to excel

  1. #1
    Registered User
    Join Date
    11-03-2014
    Location
    Cairo, Egypt
    MS-Off Ver
    2007
    Posts
    3

    Help regarding copying data to excel

    Dear All,
    I have the below macro to move the data to excel and it working so good on 2007 and once I moved to 2013 it can't work and stop on the line below
    rCount = xlSheet.Range("A" & xlSheet.Rows.Count).End(xlUp).Row
    could you please help me to solve

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer

    Please Login or Register  to view this content.
    Last edited by 6StringJazzer; 11-03-2014 at 10:32 AM. Reason: code tags

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Help regarding copying data to excel

    What is the error message?

    What is the value of xlSheet.Rows.Count when it stops? If that value causes an error, what are the values of xlSheet.Parent.Name and xlSheet.Name?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-03-2014
    Location
    Cairo, Egypt
    MS-Off Ver
    2007
    Posts
    3

    Re: Help regarding copying data to excel

    actually the file name is "new orddrs.xlsx" and the sheet name is "Orders Data"

    the code stop on the word xlUP

  4. #4
    Registered User
    Join Date
    11-03-2014
    Location
    Cairo, Egypt
    MS-Off Ver
    2007
    Posts
    3

    Re: Help regarding copying data to excel

    Any help regarding this issue is really appreciated

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Help regarding copying data to excel

    I will ask this again: What is the error message?

    When execution stops, it stops on a complete line of code. What do you mean "the code stop on the word xlUP"?

    When the code stops, press CTRL-G to open the Immediate window. In that window type

    print xlSheet.Rows.Count

    and then tell us what the response is. If is a positive integer, then I don't know why this line of code is giving you an error. If it gives an error, please provide the error information.

    I can't reproduce the error without your file although I set up a small example where the exact same line of code works properly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] I need a macro for copying the data of all excel files into one sheet of a excel file.
    By pavan_yuvaraj in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-18-2012, 09:23 AM
  2. Macro for copying specific data from excel files in a folder to a newly created excel file
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2012, 02:24 PM
  3. Copying content of one excel to another excel and sending email with excel data
    By archies.gall in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2012, 02:22 PM
  4. Replies: 9
    Last Post: 03-15-2012, 12:02 PM
  5. Copying data into a new Excel File after validating data
    By bgrondines in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2010, 09:01 AM

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