PetLahev
New Member
- Joined
- Jul 30, 2009
- Messages
- 28
Hello
I've just found this property in Excel 2007 object model and have tested it.
But it seems doesn't works. Does anybody experience with that?
I wrote this code for testing
I've just found this property in Excel 2007 object model and have tested it.
But it seems doesn't works. Does anybody experience with that?
I wrote this code for testing
Code:
Sub TestEnableFormatConditionsCalculation()
' Does it work?
Dim wks As Worksheet
Set wks = ActiveSheet
' a) directly access to a sheet
'Sheet1.EnableFormatConditionsCalculation = False
' b) Sheets method
'Sheets("Sheet1").EnableFormatConditionsCalculation = False
' c) Wprksheets method
'Worksheets("Sheet1").EnableFormatConditionsCalculation = False
' d) Activeshee method
'ActiveSheet.EnableFormatConditionsCalculation = False
' e) object variable
wks.EnableFormatConditionsCalculation = False
With ActiveCell
.FormatConditions.Add Type:=xlCellValue, _
Operator:=xlGreater, _
Formula1:="=10"
.FormatConditions(.FormatConditions.Count).SetFirstPriority
With .FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
End With
' a) directly access to a sheet
'Sheet1.EnableFormatConditionsCalculation = True
' b) Sheets method
'Sheets("Sheet1").EnableFormatConditionsCalculation = True
' c) Wprksheets method
'Worksheets("Sheet1").EnableFormatConditionsCalculation = True
' d) Activeshee method
'ActiveSheet.EnableFormatConditionsCalculation = True
' e) object variable
wks.EnableFormatConditionsCalculation = True
End Sub