Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to implement a progress bar on a userform in Excel?
I don't find any info about progress bars in the Help or Manuals -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have an example with a few variations. http://www.andypope.info/vba/pmeter.htm as does John Walkenbach. http://j-walk.com/ss/excel/tips/tip34.htm Cheers Andy Bo_ < wrote: Is it possible to implement a progress bar on a userform in Excel? I don't find any info about progress bars in the Help or Manuals. --- Message posted from http://www.ExcelForum.com/ -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could also try using a modeless form in XL2000 or above, as in this
approach: http://www.enhanceddatasystems.com/E...rogressBar.htm Robin Hammond www.enhanceddatasystems.com "Bo_ " wrote in message ... Is it possible to implement a progress bar on a userform in Excel? I don't find any info about progress bars in the Help or Manuals. --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bo_,
a possibility with API: In UserForm module: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function CreateWindowEX Lib "user32" _ Alias "CreateWindowExA" (ByVal dwExStyle As Long, _ ByVal lpClassName As String, ByVal lpWindowName As String, _ ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, _ ByVal nWidth As Long, ByVal nHeight As Long, _ ByVal hWndParent As Long, ByVal hMenu As Long, _ ByVal hInstance As Long, lpParam As Any) As Long Private Declare Function DestroyWindow Lib "user32" _ (ByVal hwnd As Long) As Long Private Declare Function SendMessage Lib "user32" _ Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _ ByVal wParam As Long, lParam As Any) As Long Private Sub CommandButton1_Click() Me.CommandButton1.Enabled = False Me.Repaint Dim y&, W&, mehWnd&, pbhWnd&, i& mehWnd = FindWindow(vbNullString, Me.Caption) W = Me.InsideWidth * 4 / 3 y = (Me.InsideHeight - 15) * 4 / 3 pbhWnd = CreateWindowEX(0, "msctls_progress32", "" _ , &H50000000, 0, y, W, 20, mehWnd, 0&, 0, 0&) SendMessage pbhWnd, &H409, 0, ByVal RGB(0, 125, 0) For i = 1 To 50000 DoEvents SendMessage pbhWnd, &H402, CInt(100 * i / 50000), 0 Next i DestroyWindow pbhWnd Me.CommandButton1.Enabled = True End Sub Regards, MP "Bo_ " a écrit dans le message de ... Is it possible to implement a progress bar on a userform in Excel? I don't find any info about progress bars in the Help or Manuals. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel progress bar | Charts and Charting in Excel | |||
How to make Ms Excel more Excel with Command Button and progress b | Excel Discussion (Misc queries) | |||
Excel and Progress | Excel Programming | |||
UserForm as Progress Indicator | Excel Programming | |||
Displaying progress on UserForm | Excel Programming |