PDA

View Full Version : Solved: Allow user to set Percentage



Djblois
04-26-2007, 02:43 PM
I want to allow my users to set the percentage they want to highlight if less then. I know how to save a number setting but I can't seem to get a percentage to work. This is the code that I am trying:


HighlightPercentage = GetSetting("Business Reporting Today", "InvoiceReportOptions", "Profit Percentage", 10) * 0.01
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:=HighlightPercentage

Bob Phillips
04-26-2007, 03:47 PM
A percentage is just a number, between 0 and 1.