VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



makes a command button change color using cint(rnd.....add as many colors as you wish but be sure t

by p_roducer (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 18th December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

makes a command button change color using cint(rnd.....add as many colors as you wish but be sure to change the rnd value.....

Rate makes a command button change color using cint(rnd.....add as many colors as you wish but be sure t



con = CInt(Rnd(3) * 3)
If con = 3 Then
Command1.BackColor = &HFF00&
ElseIf con = 2 Then
Command1.BackColor = &HFF&
ElseIf con = 1 Then
Command1.BackColor = &HFF0000
ElseIf con = 0 Then
Command1.BackColor = &HFFFF&
End If
End Sub


Download this snippet    Add to My Saved Code

makes a command button change color using cint(rnd.....add as many colors as you wish but be sure t Comments

No comments have been posted about makes a command button change color using cint(rnd.....add as many colors as you wish but be sure t. Why not be the first to post a comment about makes a command button change color using cint(rnd.....add as many colors as you wish but be sure t.

Post your comment

Subject:
Message:
0/1000 characters