copy and paste

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can i stop /prevent/disable 'Ctrl C' ant 'Ctrl V' in a datasheet form
 
In the form's Properties, set KeyPreview to Yes. Then in the KeyDown event,
try the following code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If (Shift And acCtrlMask) > 0 Then
If KeyCode = Asc("C") Or KeyCode = Asc("V") Then
KeyCode = 0
End If
End If
End Sub

This cancels the keyed entry. It won't prevent the user from using Copy and
Paste from the Edit menu.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top