I've set up a simple progress bar in a VB6 form using the Microsoft Common Controls 6.0 component, and everything seems to work correctly.
However, I use the progress bar for several different parts of the form, each of which use different (and variable) maximum values. When I try to change the maximum value at run-time after the bar has already been used once, I get the error Run-time error '380': Invalid Property Value
. The progress bar's value is already reset to the minimum before trying to change the max value.
Do these progress bars not allow their max values to be changed after use, or is there some reset method that I'm missing?
prgLoading.Min = 1
prgLoading.Max = positions.Count
The second line throws the error, and the exact same code is used earlier without any problems.