+ Reply to Thread
Results 1 to 5 of 5

how to disable ctrl c and ctrl v

  1. #1
    Registered User
    Join Date
    09-13-2008
    Location
    Montreal
    MS-Off Ver
    Office XP
    Posts
    80

    how to disable ctrl c and ctrl v

    Hello,

    Im looking for the code to disable ctrl c an ctrl v in a text box. its an active x textbox and its found on sheet1. any ideas?
    Last edited by slmi1313; 10-18-2011 at 03:05 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: how to disable ctrl c and ctrl v

    Why use a textBox - it's simpler to use the cells.

    Run DisableCutAndPaste from a suitable event procedure
    (e.g. Workbook_Open or Worksheet_Activate) and EnableCutAndPaste
    from another (e.g. Workbook_Close or Worksheet_Deactivate). I've not tried it on a TextBox but it should work

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-13-2008
    Location
    Montreal
    MS-Off Ver
    Office XP
    Posts
    80

    Re: how to disable ctrl c and ctrl v

    Thanks roy UK, but the thing is I dont want them to have the option of ctrl c or ctrl v on specific Textboxes. I was lokking around and found post talking about the key down event but I cant seem to find any code for VBA

  4. #4
    Registered User
    Join Date
    09-13-2008
    Location
    Montreal
    MS-Off Ver
    Office XP
    Posts
    80

    Re: how to disable ctrl c and ctrl v

    also just tested your code, it doesn't work on a textbox, users can still use ctrl c and ctrl v

  5. #5
    Registered User
    Join Date
    09-13-2008
    Location
    Montreal
    MS-Off Ver
    Office XP
    Posts
    80

    Smile Re: how to disable ctrl c and ctrl v

    update on this, I was able to place the following code in the keydow of the textbox and this disables the use of ctrl c
    Please Login or Register  to view this content.
    issue is resolved thanks for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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