Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for taking the time to read my question.
I have a form on which users enter info. The only required field is the product code. I have it that if there is no value in the product code field, they can't click the button to add the new info. Even if they add all data, then delete the product code, the button becomes inactive. The only way they can get around this.. and they have :( is to add a bunch of spaces. How do I test for an indefinate amount of spaces? Thanks, Brad |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Trim function, something like this:
If Trim(Text1) = "" Then MsgBox "Input Required" Text1.SetFocus Exit Sub End If "Brad" wrote: Thanks for taking the time to read my question. I have a form on which users enter info. The only required field is the product code. I have it that if there is no value in the product code field, they can't click the button to add the new info. Even if they add all data, then delete the product code, the button becomes inactive. The only way they can get around this.. and they have :( is to add a bunch of spaces. How do I test for an indefinate amount of spaces? Thanks, Brad |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Charlie!
That is perfect! Brad "Charlie" wrote: Use the Trim function, something like this: If Trim(Text1) = "" Then MsgBox "Input Required" Text1.SetFocus Exit Sub End If "Brad" wrote: Thanks for taking the time to read my question. I have a form on which users enter info. The only required field is the product code. I have it that if there is no value in the product code field, they can't click the button to add the new info. Even if they add all data, then delete the product code, the button becomes inactive. The only way they can get around this.. and they have :( is to add a bunch of spaces. How do I test for an indefinate amount of spaces? Thanks, Brad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace spaces at the end of a field | Excel Discussion (Misc queries) | |||
How do I put spaces in a field | Excel Discussion (Misc queries) | |||
How do you remove excess spaces from an Excel field? | Excel Discussion (Misc queries) | |||
Add spaces to end of field in save as PRN | Excel Programming | |||
Adding spaces to a text field | Excel Programming |