Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii > 33 Then If Not (Chr(KeyAscii) Like "#") Then KeyAscii = 0
End Sub