Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is conditional formatting possible in 123?

Other Lotus Forums

Is conditional formatting possible in 123?

by  RichardHumphreys  Posted    (Edited  )
This question was answered by Harlan Grove as follows:

<< ..it's not easy. For negative values, you can set the text color to red (4th tab in the Properties for Range dialog), but anything more requires CellContentsChange and CellValueChange event handlers written in LotusScript.

Example: show a red background if A:A1 is negative. In the LotusScript object for the range A:A1, enter these procedures.


Sub Cellcontentschange(Source As Range)
Call CellValueHandler(Source)
End Sub

Sub Cellvaluechange(Source As Range)
Call CellValueHandler(Source)
End Sub

Private Sub CellValueHandler(s As Range)
If Val(s.CellValue) < 0 Then
s.Background.BackColor.ColorName = "red"
Else
s.Background.BackColor.ColorName = "white"
End If
End Sub




To see the original discussion, click on this thread
http://www.lotus.com/rw/maindisc.nsf/afa95902ee99687505256887005c9368/2ff2e1b546e23cc3852569ea005d236b?OpenDocument
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top