In real time? Otherwise, just use Replace(Text1.Text, " ", "_")