LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Entering text in a Form

I wish to input a password using a Form called InputPwd (I'm not using an
InputBox since this can't hide the password typed). The form contains:
- a TextBox called Password and
- a Button called OKbutton

The code associated with OKbutton is:

Private Sub OKButton_Click()
InputPwd.Hide
End Sub

This behaves nearly as I want. To test it I run the following Macro:

Sub Mysub()
InputPwd.Show
MsgBox (InputPwd.Password)
End Sub

This displays the form. I can then type the password which is hidden by *
(the PasswordChar set in the TextBox properties). What I would like is that
pressing Enter at the end of typing the password should behave just as if
I've clicked on the OKbutton. Instead it moves the focus from the TextBox
to the OKbutton, meaning that I have to press Enter twice to submit my
password.

I'm sure there must be a way to get pressing Enter to do what I want.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel/Visio Form for entering data lawndart Excel Discussion (Misc queries) 0 February 15th 10 04:48 PM
entering data into a premade form Jason K[_2_] Excel Discussion (Misc queries) 3 January 7th 10 11:16 PM
Problem entering percentage on form Jase4now Excel Programming 5 August 30th 07 07:31 PM
Entering multiple records in one form Newtonboy Excel Discussion (Misc queries) 1 July 13th 06 08:34 AM
entering data on form MJWest Excel Discussion (Misc queries) 2 December 16th 05 01:04 AM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"