Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ai Ai is offline
external usenet poster
 
Posts: 3
Default Excel Status Progress Bar

Hi

Is it possible to display/manipulate excel progress bar on the bottom status bar programmatically?

Thanks
Ai
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Excel Status Progress Bar

Hi Ai,
Private Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function CreateWindowEX& Lib "user32" Alias _
"CreateWindowExA" (ByVal dwExStyle&, ByVal lpClassName$ _
, ByVal lpWindowName$, ByVal dwStyle&, ByVal x&, ByVal y& _
, ByVal nWidth&, ByVal nHeight&, ByVal hWndParent& _
, ByVal hMenu&, ByVal hInstance&, lpParam As Any)
Private Declare Function DestroyWindow& Lib "user32" (ByVal hWnd&)
Private Declare Function SendMessage& Lib "user32" Alias _
"SendMessageA" (ByVal hWnd&, ByVal wMsg&, ByVal wParam&, lParam As Any)
Private Declare Function GetClientRect& Lib "user32" _
(ByVal hWnd&, lpRect As RECT)
Private Declare Function FindWindowEx& Lib "user32" Alias _
"FindWindowExA" (ByVal hWnd1&, ByVal hWnd2&, ByVal lpsz1$, ByVal lpsz2$)

Private Type RECT
cl As Long
ct As Long
cr As Long
cb As Long
End Type

Sub PBarDraw()
Dim BarState As Boolean
Dim hWnd&, pbhWnd&, y&, h&, i&, R As RECT
hWnd = FindWindow(vbNullString, Application.Caption)
hWnd = FindWindowEx(hWnd, ByVal 0&, "EXCEL4", vbNullString)
GetClientRect hWnd, R
h = (R.cb - R.ct) - 6: y = R.ct + 3
pbhWnd = CreateWindowEX(0, "msctls_progress32", "" _
, &H50000000, 35, y, 185, h, hWnd, 0&, 0&, 0&)
SendMessage pbhWnd, &H409, 0, ByVal RGB(0, 0, 125)
BarState = Application.DisplayStatusBar
Application.DisplayStatusBar = True
For i = 1 To 50000
DoEvents
Application.StatusBar = Format(i / 50000, "0%")
SendMessage pbhWnd, &H402, Val(Application.StatusBar), 0
Next i
DestroyWindow pbhWnd
Application.StatusBar = False
Application.DisplayStatusBar = BarState
End Sub

Regards,
MP

"Ai" a écrit dans le message de
...
Hi,

Is it possible to display/manipulate excel progress bar on the bottom

status bar programmatically?

Thanks,
Ai



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel Status Progress Bar

John Walkenbach has one on his site at
www.j-walk.com/ss/files/developer.htm, look for the item entitled 'Control
the LED Display in the StatusBar '


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ai" wrote in message
...
Hi,

Is it possible to display/manipulate excel progress bar on the bottom

status bar programmatically?

Thanks,
Ai



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
reuest formula for auto update status & status date PERANISH Excel Worksheet Functions 5 June 2nd 08 04:26 PM
Excel progress bar MeTheITGuy Charts and Charting in Excel 5 March 28th 07 10:51 PM
How to make Ms Excel more Excel with Command Button and progress b immu Excel Discussion (Misc queries) 2 January 6th 07 09:14 AM
Excel VBA Progress bar on a userform Bo_[_2_] Excel Programming 3 May 28th 04 01:00 PM
Excel and Progress Fred Smith Excel Programming 3 April 28th 04 05:23 PM


All times are GMT +1. The time now is 07:10 PM.

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"