dariuzthepole
Board Regular
- Joined
- Jul 23, 2008
- Messages
- 111
Hi,
We've recently upgraded to Office 2010 and some locally stored macros are causing issues. This one is regarding a conditional formatting macro after importing data from an XML file. The code is below:
The With... commands have been commented out as the .Italic function is creating an error, causing the process to End/Debug.
This is one of several identical nested macros for several regions; the first two work with the .Italic reference active, but the remaining do not (example above).
Any help you could provide would be greatly appreciated!
We've recently upgraded to Office 2010 and some locally stored macros are causing issues. This one is regarding a conditional formatting macro after importing data from an XML file. The code is below:
Code:
Sub Macro3()'
Range( _
"C9,E9,G9,I9,L9,O9,C13,E13,G13,I13,L13,O13,C14,E14,G14,I14,L14,O14,C17,E17,G17,I17,L17,O17,C19,E19,G19,I19,L19,O19,C24,E24,G24,I24,L24,O24" _
).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="19.9", Formula2:="24.9"
' With Selection.FormatConditions(1).Font
' .Bold = False
' .Italic = False
' End With
Selection.FormatConditions(1).Interior.ColorIndex = 6
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="25", Formula2:="29.9"
' With Selection.FormatConditions(2).Font
' .Bold = True
' .Italic = False
' End With
Selection.FormatConditions(2).Interior.ColorIndex = 45
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="30", Formula2:="150"
' With Selection.FormatConditions(3).Font
' .Bold = True
' .Italic = False
' End With
Selection.FormatConditions(3).Interior.ColorIndex = 3
End Sub
The With... commands have been commented out as the .Italic function is creating an error, causing the process to End/Debug.
This is one of several identical nested macros for several regions; the first two work with the .Italic reference active, but the remaining do not (example above).
Any help you could provide would be greatly appreciated!