- 帖子
- 6
- 主題
- 3
- 精華
- 0
- 積分
- 59
- 點名
- 0
- 作業系統
- MIRCOSIOFT
- 軟體版本
- XP
- 閱讀權限
- 20
- 性別
- 男
- 來自
- TAINAI
- 註冊時間
- 2015-7-7
- 最後登錄
- 2024-5-6
|
[發問] 使用VBA程式自動設定格式化條件變成無法變色
使用VBA程式自動設定格式化條件變成無法變色.
來源範圍 = "$" & "D" & "$" & 數字 '帶入此變數設定格式化條件變成無法變色
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:=(來源範圍) '帶入此變數設定格式化條件變成無法變色
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
請問各位先進是那裡出錯? 請您教導,謝謝!
原物料量內控表.rar (243.24 KB)
|
|