#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default UserForm

How do i put the cursor in TextBox in Userform automatically when form
is called by userform1.show. I want this for entering a password for
opening an excel file.

Please Tell Me


Mahesh Baldi
India

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default UserForm

Try code like the following in the form's code module.

Private Sub UserForm_Activate()
Me.TextBox2.SetFocus
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mahesh Baldi - India" wrote in message
oups.com...
How do i put the cursor in TextBox in Userform automatically
when form
is called by userform1.show. I want this for entering a
password for
opening an excel file.

Please Tell Me


Mahesh Baldi
India



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default UserForm

there should be a option called Tab Index in the properties window.
Select the textbox you want as your password and set the TabIndex to 0.
You can go through the rest of your items and index them in order.
When someone hits tab it will go from 0--1--2 etc. When you add a
new item you will have to index it correctly.

Let me know if this helps.

-Justin

Reply
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
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
Linking userform to userform in Excel 2003 missmelis01 Excel Programming 2 August 27th 04 08:07 PM


All times are GMT +1. The time now is 08:35 AM.

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

About Us

"It's about Microsoft Excel"