0
このフォーマットでは.style
関数を使用しようとしていますが、vbaでは使用しません。私はちょうど.style
を間違って使用していますか、または私は細胞を着色するために別の方法を使用する必要がありますか?Excel-vba:条件付き書式設定:セルスタイル
'Conditional Formatting
.FormatConditions.Delete
.FormatConditions.Add xlErrorsCondition, Formula1:= _
"=IF(" & Cells(SelectedGroup, AreaSelected(2)).Offset(2, 1) & "=""Not Used"",TRUE, _
FALSE)"
.FormatConditions(1).Style = "Bad"
.FormatConditions.Add xlErrorsCondition, Formula1:= _
"=IF(" & Cells(SelectedGroup, AreaSelected(2)).Offset(2, 1) & "=""Used"",TRUE,FALSE)"
.FormatConditions(1).Style = "Good"
これによると、スタイルはformatconditionための方法ではありません。https://msdn.microsoft.com/en-us/vba/excel-vba/articles/formatcondition-object-excel –