+ Reply to Thread
Results 1 to 3 of 3

Blank value in Listbox

  1. #1
    Forum Contributor vijay2482's Avatar
    Join Date
    03-03-2009
    Location
    Paris,France
    MS-Off Ver
    Excel 2003
    Posts
    263

    Blank value in Listbox

    thanks to all who had helped me in the previous threads.......

    Please Login or Register  to view this content.
    this code will prompt a msg saying that the user has to enter a value in the textbox
    it then adds the entered text in the listbox.

    the change i want:
    when the add button is clicked without any value in the textbox,a msg is prompted and the blank value is also entered in teh listbox......
    how to change the code to avoid the addition of the blank value in the listbox???

    thanks in advance
    Last edited by vijay2482; 03-18-2009 at 10:24 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: Blank value in Listbox

    You need to use IF THEN ELSE code.

    Please Login or Register  to view this content.
    If you disable the button at design time and add this code to the change event of the textbox you can stop the user from clicking the button until the textbox has text.

    On a userform with a textbox and commandbutton.
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor vijay2482's Avatar
    Join Date
    03-03-2009
    Location
    Paris,France
    MS-Off Ver
    Excel 2003
    Posts
    263

    Re: Blank value in Listbox

    thanks a lot....
    that works perfect

+ 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