+ Reply to Thread
Results 1 to 3 of 3

Cursor position

  1. #1
    Forum Contributor
    Join Date
    02-19-2004
    Location
    San Francisco Bay Area
    MS-Off Ver
    Microsoft 365 Aps for enterprise.
    Posts
    241

    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

  2. #2
    Brian Synowiec
    Guest

    RE: Cursor position

    "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


  3. #3
    Forum Contributor
    Join Date
    02-19-2004
    Location
    San Francisco Bay Area
    MS-Off Ver
    Microsoft 365 Aps for enterprise.
    Posts
    241
    Quote Originally Posted by Brian Synowiec
    "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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1