Cursor position
Hi All, I have written a small VB script to collect data from the user. At the end of data entry a YesNo response pops up. When the user hits Yes I would like the cursor default position should be the first text box in the new window. How can I do that. Appreciate your help. Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=394290 |
"saziz" wrote:
Hi All, I have written a small VB script to collect data from the user. At the end of data entry a YesNo response pops up. When the user hits Yes I would like the cursor default position should be the first text box in the new window. How can I do that. Appreciate your help. Syed saziz- Does this work? 'TextBox1 may need renaming Private Sub UserForm_Activate() TextBox1.SetFocus End Sub Brian |
Brian Synowiec Wrote: "saziz" wrote: Hi All, I have written a small VB script to collect data from the user. At the end of data entry a YesNo response pops up. When the user hits Yes I would like the cursor default position should be the first text box in the new window. How can I do that. Appreciate your help. Syed saziz- Does this work? 'TextBox1 may need renaming Private Sub UserForm_Activate() TextBox1.SetFocus End Sub Brian Hi Brian, I just added 'TextBox1.SetFocus ' at end of the script and it works perfectly. Thank you. Syed -- saziz ------------------------------------------------------------------------ saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350 View this thread: http://www.excelforum.com/showthread...hreadid=394290 |
All times are GMT +1. The time now is 01:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com