+ Reply to Thread
Results 1 to 7 of 7

Pop-up input boxes with data validation

  1. #1
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Pop-up input boxes with data validation

    Hi - Thanks to VB Noob for solving:

    http://www.excelforum.com/excel-prog...ml#post2046118

    Now another question:

    Once cursor moves to C1, I'd like a pop-up input box to appear, in which the user has to enter in a a numerical digit. Also a method by which to validate that the digit is indeed a number and not text, plus it cannot be "zero" i.e: the lowest number is to be "1" not "0".

    Once C1 is populated, then I would like the cursor to move to D1 and another pop-up input box to appear - this time to be populated by user entering 2 letters only - again to be validated.

    Once D1 is populated, I would like cursor to move to A2.

    I've seen code on the forum for input boxes - but just am uncertain how to add to the code that VB Noob done above and to make sure about the validation.

    Thanks in advance
    Last edited by VBA Noob; 02-20-2009 at 09:20 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Pop-up input boxes with data validation

    That's a bit time consuming, why not use a userform like the one in the DatabaseForm example here

    http://www.excel-it.com/vba_examples.htm
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Re: Pop-up input boxes with data validation

    Hi

    Thanks for that Roy - will look into that.

    But I done this for meantime - it's VERY basic though and no validation:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Re: Pop-up input boxes with data validation

    Hi

    Through a bit more research I managed to do the following:

    Please Login or Register  to view this content.
    So all appears to be working fine except for the fact that in the second inputbox, one can still enter numbers - so is there a "type number" that I can use to ensure that only text is used?

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Pop-up input boxes with data validation

    Try this
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Re: Pop-up input boxes with data validation

    That's great!!

    Can the same be applied to the first box, to come up with a Input Error message to say that the value entered has to be higher than zero - for example (assuming that you Dim y

    Please Login or Register  to view this content.
    Also in the second box - it still accepts initials with numbers e.g. s4s - anyway of limiting the input to the alphabet only?

  7. #7
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Re: Pop-up input boxes with data validation

    Ok ... I've managed to:

    Please Login or Register  to view this content.
    So now there is only one outstanding problem - the second input box "intials" is still able to accept combination of text and numbers e.g. s4s - I only want it to accept text i.e. ss. ALSO, it appears that it can also accept a blank " " - basically just hitting the enter leaves the cell bank.

    So how to alter code to stop this from happening?

+ 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