Arkadaşlar aşağıdaki makronun çalışmama sebebi nedir?Dosya ektedir.
Yardımlarınız için şimdiden teşekkürler
Sub kenar_çizme()
For i = 4 To 600
If Worksheets("a").Range("h" & (i)) = 2 Then
Rows("i:i").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Else
MsgBox ("nanik")
End If
Next i
End Sub
Yardımlarınız için şimdiden teşekkürler
Sub kenar_çizme()
For i = 4 To 600
If Worksheets("a").Range("h" & (i)) = 2 Then
Rows("i:i").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlMedium
End With
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Else
MsgBox ("nanik")
End If
Next i
End Sub
