+ Reply to Thread
Results 1 to 3 of 3

Status of Focus

  1. #1
    Soniya
    Guest

    Status of Focus

    Hello!,

    Is there a way to check the status of focus in a userform control?

    some thing like :

    if Textbox1.focus = true or if textbox1.setfocus = true ???

    Thanks


  2. #2
    Jim Rech
    Guest

    Re: Status of Focus

    I think you have to find if the ActiveControl is the one you're interested
    in.

    Private Sub UserForm_Click()
    Debug.Print ActiveControl.Name
    End Sub


    --
    Jim
    "Soniya" <[email protected]> wrote in message
    news:[email protected]...
    | Hello!,
    |
    | Is there a way to check the status of focus in a userform control?
    |
    | some thing like :
    |
    | if Textbox1.focus = true or if textbox1.setfocus = true ???
    |
    | Thanks
    |



  3. #3
    Soniya
    Guest

    Re: Status of Focus

    Thanks for your reply.

    I got the point. Still my code does'nt work !!

    What i am trying to do is:

    I have two TextBoxes in my UserForm.

    by cliking a SpinButton I want to increase and decrease the font size
    based on which TextBox has the current focus.

    If the user has clicked TextBox1 (the content is locked) SpinUp should
    increase the font size by 1 and if the user has clicked on Textbox2
    then spin up should increase the font size in TextBox 2

    Thanks


+ 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