+ Reply to Thread
Results 1 to 4 of 4

SetFocus to another tab on a multi tab userform

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Central New York
    MS-Off Ver
    Excel 2010
    Posts
    18

    SetFocus to another tab on a multi tab userform

    Hi all,

    I have a simple error handler that is as follows:

    Please Login or Register  to view this content.
    I have three tabs on my userform

    tab 1=Add Points
    tab 2=Use Points
    tab 3=New Employee

    the txtnewempclock text box is on tab 3.

    If I am on the tab 1 and the vlookup doesn't find a match I want the focus to be set to tab 3 in the txtnewempclock text box.

    The way that I have it set I am getting the "RunTime error 2110 Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus" error message.

    the properties for the txt box and the tab are both enabled and visible.

    How do I get it to accept the focus?

    Thanks,

    Angelina

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: SetFocus to another tab on a multi tab userform

    can you attach your file for testing ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: SetFocus to another tab on a multi tab userform

    Hello abordeau,

    If this is a MultiPage object object, here is how to make the page active.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    02-11-2014
    Location
    Central New York
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: SetFocus to another tab on a multi tab userform

    Mr Ross, you are the BOSS!!

    Thanks so much!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] .setfocus on userform not working
    By janderson055 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-15-2017, 03:22 PM
  2. setfocus from module to userform control
    By Zygoid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2009, 10:56 AM
  3. question setfocus on a userform
    By GregJG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2007, 11:28 AM
  4. Multi-tab Setfocus Problem
    By TimT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2006, 01:10 PM
  5. [SOLVED] Userform SetFocus with Exit and Cancel
    By Neal in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2006, 09:25 PM

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