Results 1 to 2 of 2

Thread: MS Word VBA focus, document or form?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Question MS Word VBA focus, document or form?

    In a Microsoft Word VBA routine how can I tell who has focus?
    The problem is, I have a document with several custom forms that can pop up. If the user selects a custom search routine from the menu, I'd like to know if they're currently in the document or within a form so I know what they want to search.

    None of these things seem to have GotFocus/LostFocus events,
    even the textboxes I've put on the forms don't have these!?

    Also, I have to do some wierd things just to figure out the active form. Screen.Activeform isn't there, indeed, there's no Screen object at all.

    Thanks, DaveBo

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Location
    Over There
    Posts
    522
    i THINK YOU MAY WANT application.activewindow.

    type application. to see all the methods and objects available.
    It Never Fails. Everytime I try to make a program idiot proof, the world makes a better idiot.

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