You can make an Array of TextBoxes and use the GetKeyState API to determine if they were pressed.
Code:Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) 'If Control and C are pressed then If GetKeyState(vbKeyControl) And GetKeyState(vbKeyC) Then MsgBox ("Control + C was pressed") End If End Sub




Reply With Quote