Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    New Zealand
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Control handle (VBA Word 2000 SR1)

    Is there an API call that will return the handle to a VBA user form control?

    TIA

    Kevin <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Control handle (VBA Word 2000 SR1)

    When a control gets the focus, it becomes a "window", so you should be able to use this:

    Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    Charlotte

  3. #3
    New Lounger
    Join Date
    Jan 2001
    Location
    New Zealand
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control handle (VBA Word 2000 SR1)

    Thanks Charlotte, I'll give it a go

    Kevin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •