+ Reply to Thread
Results 1 to 4 of 4

Pasting values

  1. #1
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Pasting values

    Hi All

    i have certain number from a diffrent application which should be pasted into one of the cell for exampe
    In "C5"

    C5 should allow to only paste values. But i dont want user to key/type anything in c5 other
    pasting values.

    Can we have vba code regarding the above.. I am expecting that it should be something around "ALLOW EDIT ", "Pastespecial"

    Many Thanx
    Never confuse a single defeat to the final defeat.

  2. #2
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: Pasting values

    I'm not aware of a way to directly do what you are asking, but this might work for you:

    1. Right-click the cell, select Format Cells, and make sure the Protection property is Locked.
    2. Protect the worksheet (leave password-protection off for now).
    3. Select and copy the data you want to paste.
    4. Start the macro recorder, enter a shortcut key value (like 'p' for Paste) and do the following:
    5. Unprotect the worksheet.
    6. Select the cell to be updated.
    7. Paste the data.
    8. Protect the worksheet.
    9. Turn off the macro recorder.

    Check your macro code and revise as needed. If you want the sheet password-protected, add Password:="mypassword" to the .Unprotect and .Protect methods.

    To test, clear the cell value, select some data, and on the worksheet, click Ctrl+p.

  3. #3
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Re: Pasting values

    While i try the above

    If i was not clear in my question here it goes

    1) User should be able to only paste values ( values will be a copied from a different software where ctrl+c works)

    2) No direct input in the cells( i mean user should not type only use those cells to paste values)

    3) Each time i get a number / result i copy them and paste them in each cells

    Thank you
    Last edited by grkchakri; 01-02-2014 at 11:11 PM.

  4. #4
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Re: Pasting values

    Thnx nate i was able to record a macro and amend that accordingly

+ 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. Replies: 0
    Last Post: 08-13-2012, 09:09 AM
  2. IF THEN and pasting Values only
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-24-2011, 09:06 AM
  3. Pasting values only
    By LDT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-27-2010, 03:40 PM
  4. Replies: 10
    Last Post: 02-09-2010, 05:04 AM
  5. pasting values
    By Steiner in forum Excel General
    Replies: 1
    Last Post: 08-11-2005, 10:05 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