Ked Code problem
The code below prevents the entry of non-numeric values in a text box. In addition it accepts tha Tab and Backspace key. All other key entries are not allowed. I would like the user to paste values in the textbox using Ctl+V keys together.
How can I write a code to accept the Ctl and the V keys together.
Private Sub MedRecNo_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 8, 9, 13, 17, 27, 32, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
' do nothing
Case Else
msg = MsgBox("Only numeric values are allowed for Medical Record Number", , "Numeric Values Only Allowed")
KeyCode = 0
End Select
End Sub
|