Здравствуйте! У меня вопрос! Почему макрос не заливает ячейки, заливка видна только при клике на ячейку и то только полосками сверху и снизу ее. Вот кусочек кода. Очень буду рад любому совету!)
Sub SSum()
'
' SSum Макрос
'
'
Range("E2:T14").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T2:T14").Select
Selection.ClearContents
Range("E2:G2,E3:F3,G4,H5,I6,J7").Select
Range("J7").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("S2").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T2").Select
ActiveCell.FormulaR1C1 = "+++"
Range("E4,G3,H2,I2,J2,H3,H4,I5,K8").Select
Range("K8").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("S3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T3").Select
ActiveCell.FormulaR1C1 = "+-"
Range("E5:E6,F4,K2:Q2,I3:J4,J5:J6,K7,L9,M10").Select
Range("M10").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 12611584
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("S4").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 12611584
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T4").Select
ActiveCell.FormulaR1C1 = "---"
Range("T5").Select
End Sub
Sub SSum()
'
' SSum Макрос
'
'
Range("E2:T14").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T2:T14").Select
Selection.ClearContents
Range("E2:G2,E3:F3,G4,H5,I6,J7").Select
Range("J7").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("S2").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T2").Select
ActiveCell.FormulaR1C1 = "+++"
Range("E4,G3,H2,I2,J2,H3,H4,I5,K8").Select
Range("K8").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("S3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 5287936
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T3").Select
ActiveCell.FormulaR1C1 = "+-"
Range("E5:E6,F4,K2:Q2,I3:J4,J5:J6,K7,L9,M10").Select
Range("M10").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 12611584
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("S4").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 12611584
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("T4").Select
ActiveCell.FormulaR1C1 = "---"
Range("T5").Select
End Sub