progress bar

id like to know how to use the progress bar with this
for i = 1 to 1000
list1.additem i
next i
i've tryed this
for i = 1 to text1.text
list1.additem i
progressbar1.value = text1.text
next i
but get an error if text1 is over 100
p400Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
DalinConnect With a Mentor Commented:
Try
Dim lPercent as Integer
lPercent = Cint(i*100/cint(text1.Text))
Progressbar1.Value = lPercent
0
 
clifABBCommented:
While Dalin's answer is the preferred solution, you can just set the progress bar's Max property to whatever the highest number you will be using.

Progressbar1.Max = 1000
0
 
p400Author Commented:
got it working thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.