The time now is 10/27/08 - 22:06
Log in: Username: Password:
Search forums for:
  
 
H-Desk.com Forum Index

H-Desk.com - PC Security matters - Protect your PC privacy


Excel SetFocus question


H-Desk.com Forum Index -> Microsoft Software -> Microsoft Office

Post new topic   Reply to topic
Author Message
parnell



Joined: 17 Oct 2006
Posts: 3



PostPosted: 07/25/08 - 05:26    Post subject: Reply with quote

Hello. I am making a UserForm in Excel and I would like to add it some more functionality. I would like to set cursor to textbox when input is found incorrect after validation process. I tried with Activate function but I had no luck. Somewhere I heard that SetFocus could do the trick. Can you tell me something more about this function?
Back to top

worden



Joined: 06 Mar 2008
Posts: 2



PostPosted: 08/14/08 - 21:41    Post subject: Reply with quote

Excel SetFocus function can be used to accomplish functionality you want. When validation process finds invalid entry in one text box (for example TextBox1) then you can call SetFocus function like this: TextBox1.SetFocus and cursor will be placed in that text box. SetFocus only works on active user form so if you change focus it will not be able to position cursor correctly.
Back to top

Display posts from previous:   
Post new topic   Reply to topic All times are GMT

H-Desk.com Forum Index -> Microsoft Software -> Microsoft Office

Page 1 of 1

Related topics: