G
guigui
Guest
hello le forum,
je souhaite encadrer une zone de cellule en 1 fois, voici donc mon code.
Sub contour()
Range("C15:I16").Borders(xlEdgeBottom).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeTop).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeRight).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeLeft).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeBottom).Weight = xlMedium
Range("C15:I16").Borders(xlEdgeTop).Weight = xlMedium
Range("C15:I16").Borders(xlEdgeRight).Weight = xlMedium
Range("C15:I16").Borders(xlEdgeLeft).Weight = xlMedium
End Sub
ma question : est-il possible, pour reduire le code, que le LineStyle et le Weight soit sur la meme ligne, en clair, je ne veut plus du 2eme paragraphe, je voudrais un truc de ce genre :
Sub contour()
Range("C15:I16").Borders(xlEdgeBottom).LineStyle = xlContinuous.Weight = xlMedium
....
End Sub
merci d'avance pour votre aide
Guillaume
je souhaite encadrer une zone de cellule en 1 fois, voici donc mon code.
Sub contour()
Range("C15:I16").Borders(xlEdgeBottom).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeTop).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeRight).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeLeft).LineStyle = xlContinuous
Range("C15:I16").Borders(xlEdgeBottom).Weight = xlMedium
Range("C15:I16").Borders(xlEdgeTop).Weight = xlMedium
Range("C15:I16").Borders(xlEdgeRight).Weight = xlMedium
Range("C15:I16").Borders(xlEdgeLeft).Weight = xlMedium
End Sub
ma question : est-il possible, pour reduire le code, que le LineStyle et le Weight soit sur la meme ligne, en clair, je ne veut plus du 2eme paragraphe, je voudrais un truc de ce genre :
Sub contour()
Range("C15:I16").Borders(xlEdgeBottom).LineStyle = xlContinuous.Weight = xlMedium
....
End Sub
merci d'avance pour votre aide
Guillaume