Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Vba - Text Box active by default

Hi all,

I am using a user for which contains two text boxes.

I want TextBox2 being my default option when userform activates.

I need to show the cursor into TextBox2 and ready to input data.
Could anyone help, please?

Thanks in advance,
Aldo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Excel Vba - Text Box active by default

Hi ALdo

In the userform module:

Private Sub UserForm_Initialize()
TextBox2.SetFocus
End Sub

HTH. Best wishes Harald

"ajliaks " skrev i melding
...
Hi all,

I am using a user for which contains two text boxes.

I want TextBox2 being my default option when userform activates.

I need to show the cursor into TextBox2 and ready to input data.
Could anyone help, please?

Thanks in advance,
Aldo.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Vba - Text Box active by default


If by activate, you mean when the userform is first shown (created), then
set the tabindex property to 0

If hiding and showing again, then see Harald's post (which should work in
the above as well, but setting the tabindex should also be done).

--
Regards,
Tom Ogilvy


"ajliaks " wrote in message
...
Hi all,

I am using a user for which contains two text boxes.

I want TextBox2 being my default option when userform activates.

I need to show the cursor into TextBox2 and ready to input data.
Could anyone help, please?

Thanks in advance,
Aldo.


---
Message posted from http://www.ExcelForum.com/



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
Default font for pasted text in text boxes - Excel 2007 MS OFFICE USER EIT Excel Discussion (Misc queries) 0 March 25th 10 09:01 PM
Active cell default colour Boyd Excel Discussion (Misc queries) 1 October 23rd 08 12:50 AM
How to set printer default to select active sheet not whole book Vic Storey Excel Discussion (Misc queries) 0 May 16th 08 06:11 PM
Excel 2007 - Text Box (Active X) title tkwaste Excel Discussion (Misc queries) 0 October 9th 07 03:32 PM
CHANGE DEFAULT PRINT TO SELECTION INSTEAD OF ACTIVE WORKSHEET FRED SMITH New Users to Excel 2 June 27th 06 07:43 PM


All times are GMT +1. The time now is 06:22 PM.

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"