try:

Code:
If KeyAscii = 32 Then  ' 32 is the KeyAscii for space bar
MsgBox "Don't Press The Space Bar", vbExclamation, "NO SPACES"
End If