JacquesMaeder
New Member
- Joined
- Jan 14, 2018
- Messages
- 4
Hi,
I have a procedure that set / reset the pattern of the currently selected cell which work fine but I would like to set the pattern color too so I added the line in blue:
Public Sub SetReset_Pattern(thePattern, patternColorIndex)
With ActiveSheet
If Selection.Interior.Pattern = thePattern Then
Selection.Interior.Pattern = EMPTY_PATTERN
Else
Selection.Interior.Pattern = thePattern
Selection.Interior.patternColorIndex = patternColorIndex
End If
Selection.Activate
End With
End Sub
but the patternIndexColor is never executed, after setting the pattern the execution quit the procedure without any error. If I exchange the order then it's the pattern which is not set !
Just for try I entered :
Selection.Interior.patternColorIndexxxxx = patternColorIndex
and curiously the compiler does not complain !
Does anyone have an idea what is going on ?
Thank you in avance
I have a procedure that set / reset the pattern of the currently selected cell which work fine but I would like to set the pattern color too so I added the line in blue:
Public Sub SetReset_Pattern(thePattern, patternColorIndex)
With ActiveSheet
If Selection.Interior.Pattern = thePattern Then
Selection.Interior.Pattern = EMPTY_PATTERN
Else
Selection.Interior.Pattern = thePattern
Selection.Interior.patternColorIndex = patternColorIndex
End If
Selection.Activate
End With
End Sub
but the patternIndexColor is never executed, after setting the pattern the execution quit the procedure without any error. If I exchange the order then it's the pattern which is not set !
Just for try I entered :
Selection.Interior.patternColorIndexxxxx = patternColorIndex
and curiously the compiler does not complain !
Does anyone have an idea what is going on ?
Thank you in avance