Progress Bar Userform Control

technix

Active Member
Joined
May 19, 2002
Messages
326
I am playing around with the Progress bar control and would like to know exactly which resources would be best to have it do the following.

I would like to have the progress bar increase daily, 0%-100% based on days from day 1 to day 30. as I plan on offering a 30 day trial to a customer after that the must register it.

If you could point me in the proper direction it would be greatly appreciated.

Derrick
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi Tech.
Here's an example:<pre>
Sub ProgressIndicator()
Dim StartingDate As Date
StartingDate = #8/1/2002# 'wherever you stored the date when this file was first opened
With ProgressBar1
.Scrolling = ccScrollingSmooth 'my personal preference
.Min = 1
.Max = 31
.Value = DateDiff("d", StartingDate, Now)
End With
'say the user opened the file for the first time on August 1.
'say that today is August 18
'the progress bar would display the value of 17 which is equivelant to 17/31 or 54.8%
End Sub</pre>
Tom
This message was edited by TsTom on 2002-08-25 11:30
 
Upvote 0
On 2002-08-25 11:27, TsTom wrote:
Hi Tech.
Here's an example:<pre>
Sub ProgressIndicator()
Dim StartingDate As Date
StartingDate = #8/1/2002# 'wherever you stored the date when this file was first opened
With ProgressBar1
.Scrolling = ccScrollingSmooth 'my personal preference
.Min = 1
.Max = 31
.Value = DateDiff("d", StartingDate, Now)
End With
'say the user opened the file for the first time on August 1.
'say that today is August 18
'the progress bar would display the value of 17 which is equivelant to 17/31 or 54.8%
End Sub</pre>
Tom
This message was edited by TsTom on 2002-08-25 11:30

Thank you this helps out greatly, is it possible, if not its not necessary, but in the center of the progress bar, have a caption or such as 4 days remaining, I have tried to do a caption that is transparent in front of the progress bar however the progress bar seemed to stay in front of it

Derrick
 
Upvote 0
Derrick.
Are you using the pbar on a worksheet or a userform? I can't get anything to work on my worksheet...
Tom
 
Upvote 0
On 2002-08-25 11:54, TsTom wrote:
Derrick.
Are you using the pbar on a worksheet or a userform? I can't get anything to work on my worksheet...
Tom

I am using a userform. to have the progress bar. I would like it to say 4 days remaining if four days are remaining in the progress bar if at all possible, if not no big deal I will use a frame or something

Derrick
 
Upvote 0
On 2002-08-25 11:54, TsTom wrote:
Derrick.
Are you using the pbar on a worksheet or a userform? I can't get anything to work on my worksheet...
Tom

I am using a userform. to have the progress bar. I would like it to say 4 days remaining if four days are remaining in the progress bar if at all possible, if not no big deal I will use a frame or something

Derrick
 
Upvote 0
Hi Derrick.
You are right, no big deal. I went ahead and posted the question anyway at MS to see what might come up. I'll reply to this thread if anyone comes up with a decent solution.
Tom
 
Upvote 0
Currently this is how i did a work around
using a frame although if I can get the Caption in the progress bar that would be better. Thank you for your help

Code:
Private Sub UserForm_Activate()
Dim StartingDate As Date
StartingDate = #8/1/2002# 'wherever you stored the date when this file was first opened


With ProgressBar1
    .Scrolling = ccScrollingSmooth 'my personal preference
    .Min = 1
    .Max = 31
    .Value = DateDiff("d", StartingDate, Now)
End With
With Trial_popup
     .Frameprogress.Caption = 30 - ProgressBar1.Value & " Days remaining."
End With
'say the user opened the file for the first time on August 1.
'say that today is August 18
'the progress bar would display the value of 17 which is equivelant to 17/31 or 54.8%
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,425
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top