+ Reply to Thread
Results 1 to 3 of 3

Paste Special Error 1004

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2010
    Posts
    15

    Paste Special Error 1004

    Hi All,

    I do not have control over where users copy from (usually an external source like a browser, another workbook, etc.). So I used the below code in my sheet and assigned CTRL+V to the macro. It works fine when the sheet is unprotected, but throws an error (1004: PasteSpecial method of Range class failed) if protected.

    I don't want users to modify the locked cells in my sheet, so I want it protected at all times. Is there anyway around this?

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    04-25-2013
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Paste Special Error 1004

    Add a line at the beginning and one at the end of sub to unlock and lock the sheet. eg:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-14-2013
    Location
    Melbourne
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Paste Special Error 1004

    Hi DJ... I still get the same error and when I try again it works.

    My guess: Since I'm copying before the macro run, unprotecting the sheet clears the clipboard. So when I run the macro again, the sheet is already unprotected and hence it works.

    Is there anyway I can crack this? Or even a completely different approach? My aim is to restrict users to paste only values into my (protected) sheet. Any help would be greatly appreciated!

+ 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. 1004 Error/pasting special values
    By jcassel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-13-2013, 12:39 PM
  2. RUNTIME ERROR: 1004, Paste Special
    By BrandonJL in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-12-2010, 06:37 AM
  3. RUNTIME ERROR: 1004, Paste Special
    By BrandonJL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2010, 05:17 AM
  4. [SOLVED] Paste-Special - R/T 1004 help needed
    By Jim May in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2006, 12:55 PM
  5. Excel 1004 Error When Pasting Special W/ Macro
    By setoFairfax in forum Excel General
    Replies: 2
    Last Post: 04-27-2005, 10:06 AM

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