+ Reply to Thread
Results 1 to 5 of 5

Only Allow PasteSpecial as Text/Values in specific sheets

  1. #1
    Registered User
    Join Date
    01-06-2012
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010, Excel 365
    Posts
    47

    Only Allow PasteSpecial as Text/Values in specific sheets

    I have a workbook with 3 sheets. Sheet_1 has user inputs that are referenced in Sheet_2.
    Example:
    User puts "1RW9770STA123456" in cell S19 of Sheet_1
    Cell C19 in Sheet_2 will have this formula: ='Sheet_1'!S19

    The user copies the "1RW9770STA123456" from another application then pastes it into Sheet_1 Cell S19 - which frequently causes the formula in Sheet_2 Cell C19 to change to: ='Sheet_1'!#REF!
    Is there any way to disable all Paste and PasteSpecial options except the PasteSpecial As Values/Text in Sheet_1 only? The code would also need to disable the moving of cells or dragging of cells in Sheet_1.

    The workbook was created in Excel 2010, but people with Excel 2007 and Excel 2010 will use the workbook.

    I hope this makes sense.
    I appreciate any help on this.

  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: Only Allow PasteSpecial as Text/Values in specific sheets

    Originally written by Ken Puls

    Paste into standard module:
    Please Login or Register  to view this content.
    Copy and paste into thisWorkbook module:

    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
    Registered User
    Join Date
    01-06-2012
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010, Excel 365
    Posts
    47

    Re: Only Allow PasteSpecial as Text/Values in specific sheets

    That works quite well! Two things I've noticed:
    1. The cut/copy/paste is still enabled in the Quick Access Toolbar.
    2. Any chance this code can be modified to apply to just Sheet_1 and Sheet_2?

    Thank-you very much!

  4. #4
    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: Only Allow PasteSpecial as Text/Values in specific sheets

    Copy and paste these commands into the Sheet1 module AND sheet2 module

    Please Login or Register  to view this content.
    The remove this from the workbook module:
    Please Login or Register  to view this content.
    As far as the quick access toolbar goes, I couldn't tell you. I'd say just disable/remove them.

  5. #5
    Registered User
    Join Date
    01-06-2012
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010, Excel 365
    Posts
    47

    Re: Only Allow PasteSpecial as Text/Values in specific sheets

    That works great! Thank-you very much!

+ 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. Convert Text Values to Specific Numeric Values
    By lmp101010 in forum Excel General
    Replies: 5
    Last Post: 09-06-2014, 04:00 PM
  2. Copy and PasteSpecial Between Sheets in a Workbook
    By Nordeen1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2012, 08:56 AM
  3. MACRO for Copying specific values from multiple sheets
    By planetrisk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-24-2012, 11:42 AM
  4. Cut & paste values in range to specific sheets
    By Samba1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-29-2010, 08:55 PM
  5. [SOLVED] Copying sheets and PasteSpecial
    By JRF in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2006, 03:50 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