I try to avoid user from using space bar when typing the text in the textbox because I don't want to allow empty space being input in the textbox. How to do that?

If InStr(TxtKrigRasterWorkspace.Text, " ") > 0 Then