First, recognize that what you are asking isn't truly random, in that you
are restricting the color ranges. With that
said, you can use the RGB function in the same way. The function has 3
numbers, 0 to 255, such that RGB(255,0,0) is red,
RGB(0,255,0) is green, and RGB(0,0,255) is blue.
Any combination of numbers in the two zero fields will give you variations
of tints. So, if you put this code in the form load (or current event):
Dim x As Integer
Randomize
x = 250
Me.Text0.BackColor = RGB(255, Int(x * Rnd), Int(x * Rnd)) 'red shades
Me.Text1.BackColor = RGB(Int(x * Rnd), 255, Int(x * Rnd)) ' green shades
Me.Text2.BackColor = RGB(Int(x * Rnd), Int(x * Rnd), 255) 'blue shades
(substituting your textboxes for the above)
Play with the value of x. A low value gives much less variation than a high
value, but the high values will more likely
cross the "threshhold" from one color to another. Although I haven't tried
it, you could also have a second variable, y, that
will give you even more control over the tints.
Damon
..