+ Reply to Thread
Results 1 to 6 of 6

Excel 2010 Macro Copying and Pasting Data keeps failing at different points

  1. #1
    Registered User
    Join Date
    03-08-2013
    Location
    Derbyshire
    MS-Off Ver
    Excel 2003
    Posts
    46

    Excel 2010 Macro Copying and Pasting Data keeps failing at different points

    Hi,

    I have a macro that opens a CSV file and copied data. Then Opens an Excel Spreadsheet file and pastes the data into this. It works and then al of a sudden the macro fails at this point.

    (grab what ever is in C2 and add it to the worksheet tab name)

    SHEETS("ADDDATAHERE").NAME = RANGE("C2").VALUE

    This is because the data hasnt copied across. I check and every single CSV contains data so it shouldnt happen. The issue happens at different points ofthe process and If I were to F8 through every line of code in the Macro it works fine.

    It looks like a bug but I have no idea how to sort it out. I have already Set Clip Organizer to Not Available in Add remove programmes as per the advice.

    I could always try a If C2 is populated then do it, else dont but Im not quite sure how to go about re coding that.

    Any help would be appreciated.

    Thanks

    Debbie

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel 2010 Macro Copying and Pasting Data keeps failing at different points

    If you are working with multiple sheets I would fully qualify which sheets the ranges you're reading/writing are on.

    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel 2010 Macro Copying and Pasting Data keeps failing at different points

    Or
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-08-2013
    Location
    Derbyshire
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Excel 2010 Macro Copying and Pasting Data keeps failing at different points

    Excellent. I will try those and let you know.

    Debbie

  5. #5
    Registered User
    Join Date
    03-08-2013
    Location
    Derbyshire
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Excel 2010 Macro Copying and Pasting Data keeps failing at different points

    It seems to be working.

    Thanks again

    Debbie

  6. #6
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Excel 2010 Macro Copying and Pasting Data keeps failing at different points

    Glad to help. If you are satisfied with the solution please mark the thread as solved.

+ 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. Excel 2010 recalculate when pasting data
    By Bigmal70 in forum Excel General
    Replies: 1
    Last Post: 09-03-2012, 08:55 AM
  2. Runtime error 1004 when copying and pasting a filtered collumn excel 2010
    By Shedacq in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2012, 06:35 AM
  3. Replies: 2
    Last Post: 07-15-2012, 10:43 AM
  4. Help with copying/pasting macro in Excel 2010
    By ohedblad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-18-2012, 10:20 AM
  5. Excel 2010 Condition Formatting Copying and Pasting Help
    By War Eagle 78 in forum Excel General
    Replies: 0
    Last Post: 01-23-2011, 03:57 PM

Tags for this Thread

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