Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Excel 2007 statusbar hWnd

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.

--

  #2   Report Post  
Posted to microsoft.public.excel.programming
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.

--



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Excel 2007 statusbar hWnd

On Jul 2, 1:56 pm, "Bob Phillips" wrote:
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")


Thanks Bob. Works for me too!

Jamie.

--


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Excel 2007 statusbar hWnd

For my interest Jamie, what do you need the handle of the status bar for?

Bob

"Jamie Collins" wrote in message
ups.com...
On Jul 2, 1:56 pm, "Bob Phillips" wrote:
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")


Thanks Bob. Works for me too!

Jamie.

--




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Excel 2007 statusbar hWnd

On Jul 2, 3:35 pm, "Bob Phillips" wrote:
For my interest Jamie, what do you need the handle of the status bar for?


To create 'stacked' progress bars.

Jamie.

--




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Excel 2007 statusbar hWnd

Interesting. Is this for a work project, or will you publish to the world? I
did a stacked progress bar recently, on a form, but the status bar would be
nice (didn't even think of that).

--
HTH

Bob

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

"Jamie Collins" wrote in message
ups.com...
On Jul 2, 3:35 pm, "Bob Phillips" wrote:
For my interest Jamie, what do you need the handle of the status bar for?


To create 'stacked' progress bars.

Jamie.

--




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying data on Excel Statusbar? Rich Excel Programming 5 June 21st 07 06:29 PM
HWND of Listbox in UserForm in Excel macro Jozsef Bekes Excel Programming 7 November 10th 06 06:45 PM
Getting hWnd for API call or Color choosing dialog Jeff[_31_] Excel Programming 13 June 5th 04 03:18 AM
hWnd of UserForm rsmith Excel Programming 3 February 10th 04 12:32 AM
how to get hwnd from application object? Erwin Kalvelagen Excel Programming 2 December 16th 03 07:12 PM


All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"