+ Reply to Thread
Results 1 to 5 of 5

if statement to force user enter string without spacing

  1. #1
    Registered User
    Join Date
    11-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003, 2010
    Posts
    73

    if statement to force user enter string without spacing

    Hi guys, is there any way to force user to key in a string without spacing? Example if user input "test test", system will prompt error and force user to input "testtest". My code is like this

    Please Login or Register  to view this content.
    Last edited by rename; 12-20-2012 at 05:21 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: if statement to force user enter string without spacing

    Try this...

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: if statement to force user enter string without spacing

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Registered User
    Join Date
    12-17-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: if statement to force user enter string without spacing

    Hello rename,

    If you enter the following code it stops spaces being added by the user and you do not need the error message. Where I have 'text' written replace with the text box name the data is being entered into.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003, 2010
    Posts
    73

    Re: if statement to force user enter string without spacing

    Thanks guys. Problem Solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1