Results 1 to 5 of 5

Data Validation in textbox on userform

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Data Validation in textbox on userform

    Hi, I have a userform where a user can enter a postcode in the textbox on the userform, and so the post code is entered in the table once the user clicks OK on the userform. I am just wondering is there a VBA code which can limit the user to only entering 2 characters for the post code, and if he/she enters more than two characters and clicks on OK on the uerform, then a message box pop ups warning that only two characters are allowed.

    I am guessing a If statement is needed, yet because I am new to VBA coding I am not quite sure how to construct it. Can anyone please help me?
    Last edited by nav505; 03-12-2013 at 06:35 PM.

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