0

Good day!

How to detect if ctrl + c or copy keyboard action in a combo box and put the text in that combo box to clipboard..and then ctrl + v to second combo box then paste the text from clipboard that waste copied.


Thank you!

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by blocker
0

To know if the user hits Ctrl + C or Ctrl + V, try this one:

Dim key as Boolean

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
key = Shift And vbCtrlMask

If key And (KeyCode = vbKeyA) Then
'your code here
End If
End Sub

Same code applies when the user clicks Ctrl + V.
Hope this helps.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.