469,167 Members | 1,946 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

How to change background color in a grid?

I want to change background color in a control in a form grid depending on the value in another control in the same grid. Can anyone giv me a hint about how to do this?
Please!
Mar 11 '11 #1
1 3088
pod
298 100+
Combo0 is your color deciding comboBox
Text2 is your color changing textbox

you can retrieve the preferred color numbers from the property view after making a color selection

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo0_Change()
  2.     Select Case Combo0
  3.         Case 1
  4.             Text2.BackColor = 16777215 
  5.         Case Else
  6.             Text2.BackColor = 16744448
  7.     End Select
  8. End Sub
  9.  
Mar 11 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Nancy Carter | last post: by
1 post views Thread by Omar Llanos | last post: by
reply views Thread by Tom | last post: by
7 posts views Thread by VB Programmer | last post: by
8 posts views Thread by Bosconian | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.