+ Reply to Thread
Results 1 to 5 of 5

Code for copy/pasting sometimes does not work properly

  1. #1
    Registered User
    Join Date
    10-13-2019
    Location
    Canada
    MS-Off Ver
    365
    Posts
    2

    Code for copy/pasting sometimes does not work properly

    Hi,
    I have a code for copying and pasting that sometimes works, and sometimes does not. When it does not work, gives error 1004: copy area and paste area are not the same size.
    I am struggling whith this problem for a while and can't get past it.

    P.S. Some stuff in my code you might find unnecessary, but I learn as I go. Also, this type of work in the code will be repeated at least 10 times, but instead finding "si", I will do various other elements like Fe, Hg, La...

    Please Login or Register  to view this content.
    Last edited by mish21; 10-13-2019 at 01:55 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Code for copy/pasting sometimes does not work properly

    I think you better read the forum rules. Something with code tags and a sample file.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Code for copy/pasting sometimes does not work properly

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    10-13-2019
    Location
    Canada
    MS-Off Ver
    365
    Posts
    2

    Re: Code for copy/pasting sometimes does not work properly

    Perfect!!
    I only made a mall change in the offset of fnd2. Wanted the values to be copied on the right, not in the below row.

    Do you have any idea why my code was sometimes working perfectly and occasionally giving an error? I generally learn by recording the macro and dissecting the code, but I still can't find any reason why it didnt work.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Code for copy/pasting sometimes does not work properly

    Glad it worked out. Without seeing your workbook, it's hard to tell why you had that problem.

+ 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] vba code to change font failed to work properly
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-13-2017, 11:02 AM
  2. [SOLVED] Code working when using F8, but doesnt work properly through button click.
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-01-2013, 09:58 AM
  3. [SOLVED] My code to find longest string in column doesn't work properly! Need Help!!
    By refree in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2013, 08:27 AM
  4. [SOLVED] Work Order tracker date code not working properly
    By Jeff up North in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2013, 03:25 PM
  5. [SOLVED] New Code Copy Doesn't Work properly
    By Kyle123 in forum Suggestions for Improvement
    Replies: 3
    Last Post: 07-18-2012, 08:00 AM
  6. Replies: 0
    Last Post: 12-30-2005, 06:00 AM
  7. Replies: 0
    Last Post: 12-30-2005, 03:20 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