+ Reply to Thread
Results 1 to 2 of 2

SetFocus problem

  1. #1
    JH
    Guest

    SetFocus problem

    Hello,
    please does anyone know why this code gives run-time error - object doesn't
    suport this properity or method



    Private Sub Radio2_Click()
    Worksheets("start").TextBox3.Enabled = True
    Worksheets("start").TextBox3.BackColor = &HFFFFC0
    Worksheets("start").TextBox3.SetFocus -THIS LINE CAUSES RUN-TIME ERROR

    End Sub

    thanks in adavance for any suggestions

    JH


  2. #2
    Tom Ogilvy
    Guest

    Re: SetFocus problem

    You have to use activate when it is located on a worksheet. The setfocus
    method belongs to the control object and it is only available in a userform.

    --
    Regards,
    Tom Ogilvy


    "JH" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    > please does anyone know why this code gives run-time error - object

    doesn't
    > suport this properity or method
    >
    >
    >
    > Private Sub Radio2_Click()
    > Worksheets("start").TextBox3.Enabled = True
    > Worksheets("start").TextBox3.BackColor = &HFFFFC0
    > Worksheets("start").TextBox3.SetFocus -THIS LINE CAUSES RUN-TIME ERROR
    >
    > End Sub
    >
    > thanks in adavance for any suggestions
    >
    > JH
    >




+ 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