Johnny Thunder
Well-known Member
- Joined
- Apr 9, 2010
- Messages
- 693
- Office Version
- 2016
- Platform
- MacOS
Hello all,
Working on a new type of code for creating a Userform Progress Bar. Never done anything like this before so bare with me.
I found this article on the web as a start to create the userform and bar visually - http://www.excel-easy.com/vba/examples/progress-indicator.html
And it was a great help to get started but now I am stuck with writing the code that will display the actually bar progress.
Currently, I have a cell, a named range that tells the current status of the code based on how many times a value is placed into a cell that will be copied approx 68 times.
I was hoping to use this named range into the code for the progress bar to display the current progress % but nothing happens when I execute? Not sure what I am doing wrong.
Below is the code that is in my Userform along with the Sub I wrote to display the named range as the progress percentage. Nothing happens when I execute though? No screen flicker, no user form display, nothing....
Working on a new type of code for creating a Userform Progress Bar. Never done anything like this before so bare with me.
I found this article on the web as a start to create the userform and bar visually - http://www.excel-easy.com/vba/examples/progress-indicator.html
And it was a great help to get started but now I am stuck with writing the code that will display the actually bar progress.
Currently, I have a cell, a named range that tells the current status of the code based on how many times a value is placed into a cell that will be copied approx 68 times.
I was hoping to use this named range into the code for the progress bar to display the current progress % but nothing happens when I execute? Not sure what I am doing wrong.
Below is the code that is in my Userform along with the Sub I wrote to display the named range as the progress percentage. Nothing happens when I execute though? No screen flicker, no user form display, nothing....
Code:
Private Sub UserForm_Activate()
Code
End Sub
Sub Code()
Dim pctCompl As Single
pctCompl = Range("PrgB").Value
UserForm1.Text.Caption = pctCompl & "% Completed"
UserForm1.Bar.Width = pctCompl * 2
DoEvents
End Sub