View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_21_] Stuart[_21_] is offline
external usenet poster
 
Posts: 154
Default Trim not working

User enters their data on the form then clicks ok.
A sub executes, and initially I use trim on some of the
textboxes eg:

With FrmDataEntry
UsrName = Trim(.TbUsrName)
which doesn't work...and tried
UsrName = Trim(.TbUsrName.Value)
which doesn't work either.

However, this statement which is executed from a different form's click
event does work:

If Trim(Userform1.TextBox1) = "" Then

Education please!

Regards.