+ Reply to Thread
Results 1 to 3 of 3

VBA sporadically throwing pastespecial runtime error

  1. #1
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    381

    VBA sporadically throwing pastespecial runtime error

    Bit perplexed by this one guys, I'm sure it'll be somthing silly....

    I'm getting occasional runtime errors when testing my code, usually on the rows highlighted in Red and pasting values. It seems to have coincided when I added in the blue rows but not sure if that's just coincidence. Appreciate any thoughts and also any general tidying up anyone spots with how I've written the code, I'm sure it's not 100% efficient/best practice.

    Please Login or Register  to view this content.
    Last edited by benoj2005; 01-28-2021 at 09:29 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA sporadically throwing pastespecial runtime error

    Deleting a sheet could mean there's nothing to paste.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    02-14-2012
    Location
    Warrington
    MS-Off Ver
    Excel 365
    Posts
    381

    Re: VBA sporadically throwing pastespecial runtime error

    Oh so if I copy from a sheet then delete another sheet, it loses the clipboard info even though it wasn't from the deleted sheet?

    Moved the delete sheet up two rows to before the copy and seems to have sorted it never realised that event would lose the previously copied info, knew it would be something silly!

+ 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] Excel Macro throwing Runtime error 5 when file is shared!
    By murali.a.89 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2019, 01:56 AM
  2. [SOLVED] Mac throwing error - Runtime Error 429 - ActiveX Component Can't Create Object
    By harman83 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-28-2018, 11:04 PM
  3. [SOLVED] SUMPRODUCT throwing RunTime Error 13 - Type mismatch
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2018, 11:08 PM
  4. Runtime error 1004 @ every 2nd run @ pastespecial
    By BlauePflanze in forum Excel General
    Replies: 0
    Last Post: 10-21-2014, 03:55 AM
  5. [SOLVED] Pastespecial xlPasteValues Runtime Error 1004
    By natefarm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2013, 01:37 PM
  6. [SOLVED] Runtime error PasteSpecial method of Range class failed
    By russ50 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 02:27 AM
  7. [SOLVED] Runtime Error 1004 when trying to PasteSpecial
    By Phil Davis in forum Excel General
    Replies: 2
    Last Post: 02-16-2006, 06:10 PM

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