+ Reply to Thread
Results 1 to 5 of 5

How to Prevent Textbox Manual Entry On UserForm

  1. #1
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    How to Prevent Textbox Manual Entry On UserForm

    Dear Friends,

    In a Userform I have a Textbox Named As “Textbox8” next to that I have a command button Named as “CommandButton4”

    CommandButton4 basically linked with another userform i.e. calendar; So my intention is any user must select date by clicking “CommandButton4”; calendar will Pop up and once the date chosen same will be reflecting in “Textbox8”; which is Perfectly working Fine for me.

    The Support I am looking here is: -

    How to prevent any user not to enter textbox8 manually?

    How to guide (or) communicate them to click on adjacent Command button (Calendar Image already Loaded on it) to update Textbox8?

    Looking forward your valuable suggestion!

    Thanks & Regards,
    Rajeshkumar R
    Last edited by Rajeshkumar R; 04-01-2020 at 02:43 AM. Reason: Query Resolved

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to Prevent Textbox Manual Entry On UserForm

    Set the Textbox8 Enabled property to False. This will allow display of the textbox, and code can put values in it, but the user cannot put values in it. You can do this in code or in the form designer. Another option is to use a Label instead of a Textbox, which is what I prefer in these situations.

    The placement of the calendar button should be intuitive to the user but you can add a Label above the textbox that says "Click button to select date"
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    07-10-2019
    Location
    england
    MS-Off Ver
    2013
    Posts
    486

    Re: How to Prevent Textbox Manual Entry On UserForm

    You can use locked property set to true.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to Prevent Textbox Manual Entry On UserForm

    Quote Originally Posted by dorabajji View Post
    You can use locked property set to true.
    This is the best answer, I had not known about this.

  5. #5
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Prevent Textbox Manual Entry On UserForm

    Dear 6StringJazzer/dorabajji,

    Noted, Thanks a lot for your instant input.

    Thanks & Regards,
    Rajeshkumar R

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Lock cells with formula to prevent manual data entry into those cells.
    By jitterbug888 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2015, 12:24 AM
  2. Replies: 0
    Last Post: 02-04-2014, 12:36 AM
  3. Replies: 3
    Last Post: 10-30-2013, 08:12 AM
  4. Excel 2007: Userform Textbox Prevent Number as the first entry
    By Hudas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-20-2012, 02:48 PM
  5. Replies: 2
    Last Post: 07-09-2012, 02:05 AM
  6. Force Manual Entry / Prevent Pasting
    By FallingDown in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-26-2012, 09:58 AM
  7. Prevent Manual Data Entry
    By BRAY1980 in forum Excel General
    Replies: 1
    Last Post: 10-26-2011, 05:42 AM

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