+ Reply to Thread
Results 1 to 5 of 5

difficulty with SetFocus in data validation for textbox

  1. #1
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    difficulty with SetFocus in data validation for textbox

    Hello All,
    Thought I would ask for your expertise on this question as you all have been so helpful with other ones.

    Trying to have a format validation for a Registration Date Textbox

    What I am trying to do is have the cursor return to the textbox (similar to "stop" error alert when adding data validation to a cell)

    I've tried Textbox1.SetFocus
    and TextBox1.Activate
    and TextBox1.Select

    None of these work, please advise as a person could click "okay" on the msg box and proceed, leaving the date box blank.

    Here is my code as it stands

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Haven't met up with numericformat. What version of Excel are you using, or what is the function code?

    rylo

  3. #3
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117
    I am using Excel 2002 with Service pack 2

    I would actually like to lose the NumericFormat part.

    What I was trying to do with that was stop the textbox from ignoring non-numeric value

    with the current code, I could type in "noon" and it would be fine. I was trying to force the hh:mm format. Any idea how to get it to apply to non-numeric data too? Also have one for date.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Is NumericFormat a User Defined Function?

    Try this, change the TextBox name

    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

  5. #5
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    / separator in date = non-numeric

    how do I get it to accept the / separator?

+ 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