Visual Basic Tips


テキストボックス・Enter押下時のBeep音消去


Enterを押下した時、Beep音を消すには

Private Sub Text1_KeyPress(KeyAscii As Integer)
  
If KeyAscii = vbKeyReturn Then 'Enter押下
    KeyAscii = 0
  
End If
End Sub

これだけです。