▽1
●
Silvanus ベストアンサー |
細かい動作があなたのご希望通りかどうか判りませんが
こんな感じでいかがでしょうか。
Option Explicit Sub KeisenSpecial() Dim rngCell As Range For Each rngCell In Selection With rngCell If .Row = Selection.Row Then With .Borders(xlEdgeTop) .LineStyle = xlContinuous .ColorIndex = xlAutomatic .Weight = xlMedium End With End If With .Borders(xlEdgeBottom) .LineStyle = xlContinuous .ColorIndex = xlAutomatic If (rngCell.Row - Selection.Row + 1) Mod 10 = 0 Then .Weight = xlMedium Else .Weight = xlThin End If End With End With Next ' .LineStyle ' xlContinuous 実線 ' xlDash 破線 ' xlDashDot 一点鎖線 ' xlDashDotDot 二点鎖線 ' xlDot 点線 ' xlDouble 二本線 ' xlLineStyleNone 線無し ' xlSlantDashDot 斜破線 ' .Weight ' xlHairline 極細線 ' xlMedium 普通 ' xlThick 太線 ' xlThin 細線 End Sub