Is there a way to get rid of that beep sound when using CTRL+A to select all text in a textbox?
I'm using this code, with the Form's KeyPreview property set to True.
vb Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If Shift = vbCtrlMask Then If KeyCode = vbKeyA Then Control_SelectAll Me.ActiveControl End If End If End Sub Public Sub Control_SelectAll(ByRef ControlObject As Control) On Error Resume Next With ControlObject .SetFocus .SelStart = 0 .SelLength = Len(.Text) End With End Sub




Reply With Quote
