Bonjour,
C'est une curiosité pour laquelle je n'ai pas de réponse...
Il faudrait tester :
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
Private 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
Sub Test()
Dim hWndParent As Long, sParentClassName As String
Dim hWndChild As Long, sChildClassName As String, sChildWindow As String
sParentClassName = "XLMAIN"
hWndParent = FindWindow(sParentClassName, vbNullString)
'Application.hWnd returns the same as above
sChildClassName = "EXCEL7"
sChildWindow = ActiveWindow.Caption 'in my case "Book1"
hWndChild = FindWindowEx(hWndInt, ByVal 0&, sChildClassName, sChildWindow)
MsgBox hWndChild 'this returns 0 ie the function didn't find the handle
End Sub
dans les deux cas... et voir si c'est différent.