Susan Harkins
ssharkins at gmail.com
Fri Dec 10 13:12:26 CST 2010
> Private Declare Function BringWindowToTop Lib "user32" (ByVal lngHWnd As
> Long) As Long
======This one begs the function, FindWindow -- but I can't get it to return
anything but 0??? I can get the class Okay, but the window name/caption -- I
must be passing the wrong strings. I really don't have a clue what to pass
and I'm just guessing. I've tried several different strings, and everything
returns 0 -- any help?
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Function apicFindWindow()
'Get window handle.
Dim hWnd As Long
hWnd = FindWindow("oMAIN", "Table2")
Debug.Print hWnd
End Function
Susan H.