Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Function calls a Sub to change the cell font color
Hi guys
I have written a function which returns a double but i want to call a sub from within it which will set the font color of the cell (in reality i want it to set the color of the ActiveCell) Function foo(ByVal x as Double) as Double .. .. if x 2 then call setColorTo3() foo = 123.456 else call setColorTo1() foo = 1.111 end if .. .. End function Sub setColorTo3() Activecell.Select With Selection.Font .ColorIndex = 3 .Bold = True End With End Sub Sub setColorTo1() Activecell.Select With Selection.Font .ColorIndex = 1 .Bold = True End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot change font color or cell color | Excel Discussion (Misc queries) | |||
Reg. Change of font color in a cell | Excel Worksheet Functions | |||
Change font color in cell | Excel Discussion (Misc queries) | |||
how do i change row font color based on cell value in that row | Excel Worksheet Functions | |||
How to change the default Border, Font Color, and Cell Color | Excel Discussion (Misc queries) |