problème macro

  • Initiateur de la discussion fabien
  • Date de début
F

fabien

Guest
SAlut à tous!!!

En pleine macro, je désire compléter une macro ki conplèterai un tableau sur une ma feuille exel en fonction d'un choix bien préci

g enregistrer cette macro ms elle ne tourne pas

voici le message d'erreur :

"Impossible de définir la propriété Weight de la classe Border"

Que cela veut dire? sui débutant sur vba! pouver vous m'aider?

Merci à tous! @+
 
A

Arnaud

Guest
salut,

le truc c'est que si tu ne nous montre pas le code, cela risque d'être dur qu'on t'aide.
sinon la propriété Weight de la classe Border permet de définir l'épaisseur de la bordure d'un objet mais dans ton cas qu'elle est cette objet..aucune idée :(.
 
F

fabien

Guest
Voici le code de ma macro ;-)

Range("I15:I20").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Range("A15:I15").Select
Range("I15").Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Interior.ColorIndex = 15
Range("H24").Select
End Sub
 

Membres actuellement en ligne

Statistiques des forums

Discussions
314 210
Messages
2 107 299
Membres
109 796
dernier inscrit
aelgar