Results 1 to 5 of 5

Thread: Help - GotFocus and Lost focus Event

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Help - GotFocus and Lost focus Event

    Hi! can anybody pls. help me..I have an excel file with macro using VB6...my excel file has a button, where in when i click it a form will appear containing 2 textboxs and 1 button and i want my textbox to change color when it "GotFocus" and "lostFocus" but unfurtunetly the GotFucos Event and LostFOcus event is not in the list. can anybody pls. help me on this...thanks in advance!

  2. #2
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Re: Help - GotFocus and Lost focus Event

    Hi daimous,

    First off, your message will probably be moved to "Office Development".

    But anyway, what version are you using. I have Excel 2002. And it has the events.
    VB Code:
    1. Private Sub TextBox1_GotFocus()
    2.  
    3. End Sub
    4.  
    5.  
    6. Private Sub TextBox1_LostFocus()
    7.  
    8. End Sub
    Keith_VB6

    If you have any further questions, just ask.
    If this solves things, then please mark the thread resolved.
    [Thread Tools] --> [Mark Thread Resolved]

  3. #3

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: Help - GotFocus and Lost focus Event

    why? my question is something to do with VB6...anyway..im using office 2003..i just dont know why i dont have the gotfucos and lostfocus events...

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Help - GotFocus and Lost focus Event

    This isn't VB6, but VBA6.X (Visual Basic for Applications), which uses similar code, but is different - especially in cases like this. As such I have moved this thread to the Office Development forum, where you should get more relevant answers.

  5. #5

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: Help - GotFocus and Lost focus Event

    ok thanks!!!!

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