Results 1 to 3 of 3

Thread: [RESOLVED] Tab Stop

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2006
    Posts
    102

    Resolved [RESOLVED] Tab Stop

    I have a screen with a lot of stuff on it. Grids, frames, tabs, etc. I'm trying to turn off all the tab stops except one. I was able to get all of them off except the one I want off and one other one I can't seem to find.

    Is there a easier way to find what is still on? Thanks!

  2. #2
    Addicted Member
    Join Date
    Sep 2002
    Location
    Cape Town, SA
    Posts
    144

    Re: Tab Stop

    try this code inside a command button:

    Dim ctrl As Control

    For Each ctrl In Me.Controls
    If ctrl.TabStop = True Then
    MsgBox ctrl.Name
    End If
    Next

  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: Tab Stop

    To check a property, you can always do this:
    VB Code:
    1. Private Sub Command1_Click()
    2.   Dim ctl As Control
    3.   For Each ctl In Controls
    4.     On Error Resume Next
    5.     If ctl.TabStop = True Then MsgBox ctl.Name
    6.   Next ctl
    7. End Sub
    Be fore warned -- this will check EVERY control on the form for a TabStop.. so, if you want to only try one type of control, dimension ctl as that type of control, so for example, for only TextBoxes:
    VB Code:
    1. Dim ctl as TextBox
    I think this would work better for what you wanted, but I wasn't sure. It will give you a message box for each control that has a TabStop = True.

    The error thing is added because not all items have a TabStop, so otherwise you'll get some "data property not found" errors.
    Like Archer? Check out some Sterling Archer quotes.

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