From: IN%"Mark.Jacobson@uni.edu" "MARK JACOBSON" 8-MAR-2000 14:10:17.29 To: IN%"810-030-01@uni.edu" Subj: hsbWidth Slimer.... Hi 030 students, Here is a problem that I just duplicated, and its solution. The Horizontal Scroll Bar is named hsbWidth in my program. -------- >I was just working on my project and everything works until I get to the >frmWidth. The change event works except it doesn't put a value in the >lblCurrentWidth. However, when I try to scroll the whole form goes black >and it gives me a Run-time error '380': Invalid property Value. When I >debug it it highlights the line in the code under hsbWidth_Scroll that >reads "Line1.BorderWidth = hsbWidth.Value". I duplicated this error by changing my hsbWidth.Max to 1000 or 2000 which is a very, ridiculously large number. When I do the hsbWidth_Scroll event, by dragging the thumb of the scroll bar, it makes the whole frmWidth quickly BLACK, because the Line1 object has become SOOOOOO WIDE, SOOOOOOOOOOOOOOO fast. If I set hsbWidth.Min to 0, which is ILLEGAL, then when I scroll the other direction, I eventually get the Run-Time error 380, since a line cannot have a width of 0, or rather Line1.BorderWidth = 0 is ILLEGAL. So set your hsbWidth.Min to 1 and your hsbWidth.Max to 20 or 30 or so. Set the hsbWidth.SmallChange to 1 or 2 and the hsbWidth.LargeChange to 4 or 5 too. The default MAX property for a scroll bar is 32,767 and the default MIN value is 0. The default SmallChange is 1 and the default LargeChange is 1, so it is usually the Scroll event that gets you in trouble more quickly! ------ Setting the proper property values at Design time is a big part of Visual Basic programming. Mark