+ Reply to Thread
Results 1 to 2 of 2

Userform to accept input from textbox after "return" is pressed

  1. #1
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Userform to accept input from textbox after "return" is pressed

    I have created a userform designed to accept the password from the user. I went with the userform because this way when the user types in the password it appears on the screen as "*******" so you dont actually see the password being typed in.

    I am not an expert on userforms and i have a question:


    After user types in text into userform and they hit the return button i want this to accept the users input...........but instead pressing return just highlights the "OK" button. Any ideas?

    I am attaching the macro i have at this point. to execute goto first page of workbook and press the "View Report" button.
    Attached Files Attached Files
    Last edited by welchs101; 10-11-2012 at 06:59 AM.

  2. #2
    Forum Contributor
    Join Date
    12-01-2007
    Location
    USA-North Carolina
    MS-Off Ver
    MS Office 2016
    Posts
    2,712

    Re: Userform to accept input from textbox after "return" is pressed

    ok. i should have done some additional searching before posting my answer but basically what i did to get enter to accept the input is this.......

    and this worked.


    ***************************************************************
    Change the "Default" property of the command button to True.

    You should see the properties window on the left of the VBA editor. If not, press F4.

    Click on the button

    Find the property called Default. It will say False.

    Double click it to change it to True.

    Now, pressing Enter will run the button's code.

    **************************************************************

+ 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