View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Excel 2007 statusbar hWnd

Jamie,

From Winspector, the class of the status bar seems to be Excel2 now, which
is a pain.

This seems to work

Dim hThis As Long
Dim hExcel2 As Long
Dim hStatus As Long

hThis = FindWindow("XLMAIN", Application.Caption)

hExcel2 = FindWindowEx(hThis, 0&, "EXCEL2", vbNullString)

hStatus = FindWindowEx(hExcel2, 0&, "MsoCommandBar", "Status Bar")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jamie Collins" wrote in message
oups.com...
Anyone know how to get the handle of the statusbar in Excel 2007? For
earlier versions I'm using:

Dim hThis As Long
hThis = FindWindow(vbNullString, ThisWorkbook.Caption)

Dim hExcel4 As Long
hExcel4 = FindWindowEx(hThis, 0, "EXCEL4", vbNullString)

Thanks,
Jamie.

--