Conditional formatting

G

Guest

Hi I’m working with a spreadsheet control, and I realize that lot’s of the
vbscript programming is like excel programming. Well spreadsheet control does
not support conditional formatting, so to go around this problem I tried a
couple of codes but I had no look. What I’m trying to do is change the font
color of a cell if the result of a formula is less then 0. thanks.
 
G

Guest

Manually select cell A1 and pull-down
Format > Conditional Formatting and select:
Cell is less than 0
and apply your format.


The Macro Recodred can capture this:

Sub Macro1()
Range("A1").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="0"
Selection.FormatConditions(1).Interior.ColorIndex = 4
End Sub
 
G

Guest

Well I can’t do that because there is no conditional formatting no a
spreadsheet control. I’m programming a outlook form that have a spreadsheet
control. I also tried using the if declaration, but I had no results

"Gary''s Student" escreveu:
 
G

Guest

Well I can’t do that because there is no conditional formatting no a
spreadsheet control. I’m programming a outlook form that have a spreadsheet
control. I also tried using the if declaration, but I had no results

"Gary''s Student" escreveu:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top