I am trying to get a progressbar to display smoothly here is my code which causes an error “Invaid Cast Exception”
The values that cause this error are ADN = 105.49148819330023 and Progressbar1.Maximum =106Code:If ADN > 100 + (Rate) And ADN <= 100 + (Rate * 2) Then ProgressBar1.Visible = True ProgressBar1.Minimum = 0 ProgressBar1.Maximum = 1000 ProgressBar1.Minimum = 100 + (Rate) ProgressBar1.Maximum = ((100 + (Rate * 2))) ProgressBar1.Value = Format((ADN / ProgressBar1.Maximum), "###0%") Else End If
Progressbar1.Miniumum = 103
Now as you can see these numbers are very nearly the same which is why I am using the % to spread the values displayed by the progressbar from 0-100 to give some resolution to the display, as the progressbar values by default only step in 1's.![]()




Reply With Quote