Results 1 to 5 of 5

Thread: TextBox + Enter -> Pling but wants TAB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Stockholm, Sweden
    Posts
    83
    I am doing an input program that inputs to a TextBox array. I want enter to act as tab and I use SendKeys "{TAB}" for that but I can not get rid of then Pling that occures.

    Any suggestions ?
    Yesterday, all my troubles seemed so far away...
    Help, I need somebody, Help...
    Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Try setting the MultiLine property to True. This will get rid of the ping.

  3. #3
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    If I understood you correctly you want the Enter key to act as a Tab (as in, adding a tab to the text).
    First set the MultiLine to True, then instead of making it multiple lines, make it support tabs, like this:
    Code:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
        If KeyAscii = vbKeyReturn Then
            KeyAscii = 0
            Text1.SelText = vbTab
        End If
    End Sub

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Hi Yon! I don't think AKA wanted to insert a tab when he pressed enter. But change focus to the next TextBox. He should continue to use SendKeys.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Stockholm, Sweden
    Posts
    83

    Talking

    Thanks, I got the change focus working. I also learned about SelText that i will explore tomorrow.

    Thanks, AKA
    Yesterday, all my troubles seemed so far away...
    Help, I need somebody, Help...
    Now MCSD and still locking for intresting job in the south parts of Stockholm, Sweden.

Posting Permissions

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



Click Here to Expand Forum to Full Width