Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    122

    Unanswered: Colors In Conditional Formatting

    I am wondering if there is any way to select a color other than those displayed in the conditional formatting drop down.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: Colors In Conditional Formatting

    Originally posted by shearness
    I am wondering if there is any way to select a color other than those displayed in the conditional formatting drop down.
    Is there conditional formatting in ACCE$$97?

  3. #3
    Join Date
    Mar 2004
    Posts
    118
    Where are you trying to select a colour? I know MSA2000 has 16 mil at least, thers a number for each colour, eg 0 for black.


    Are you trying to colour a report or a form or something else?

  4. #4
    Join Date
    Mar 2004
    Posts
    118
    I found this bit of code, its asp, but im sure something similar can work in VBA...

    private void OnNWDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
    {
    if (e.Item.ItemType == ListItemType.Item ||
    e.Item.ItemType == ListItemType.AlternatingItem)
    {
    DataRowView rv = (DataRowView)e.Item.DataItem;
    // Get fourth column value.
    Int32 nUnitsInStock = Convert.ToInt32(rv.Row.ItemArray[4]);
    if (nUnitsInStock < 20)
    {
    e.Item.Cells[4].BackColor = Color.Red;
    }
    }
    }

    Aside from coding conditional formating in VBA i doubt you can do it.

  5. #5
    Join Date
    Mar 2004
    Posts
    118
    Here u go:

    Dim ctl(4) As String

    ctl(0) = "AnalysisStatus"
    ctl(1) = "SecondControlName"
    ctl(2) = "ThirdControlName"
    ctl(3) = "FourthControlName"
    ctl(4) = "FifthContolName"

    For i = 0 To 4

    Select Case Me.Controls(ctl(i))

    Case Null
    Me.Controls(ctl(i)).ForeColor = 8421504
    Me.Controls(ctl(i)).BackColor = vbWhite

    Case "On-Track"
    Me.Controls(ctl(i)).ForeColor = 65280
    Me.Controls(ctl(i)).BackColor = 65280

    Case "Behind Schedule"
    Me.Controls(ctl(i)).ForeColor = 65535
    Me.Controls(ctl(i)).BackColor = 65535

    Case "On-Hold"
    Me.Controls(ctl(i)).ForeColor = 16764057
    Me.Controls(ctl(i)).BackColor = 16764057

    Case "Serious Problems"
    Me.Controls(ctl(i)).ForeColor = 255
    Me.Controls(ctl(i)).BackColor = 255

    End Select

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •