Skip to content

Instantly share code, notes, and snippets.

@Lycheejam
Created October 24, 2017 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lycheejam/973fd4584097ac35f411ff863ef9893f to your computer and use it in GitHub Desktop.
Save Lycheejam/973fd4584097ac35f411ff863ef9893f to your computer and use it in GitHub Desktop.
'************************
'**CelleLine設定(水平罫線)
'************************
' LineSw(罫線設定先シート&範囲, 罫線種類)
Sub LineSw(ByRef targetRange, ByRef colorCase As boolean)
If LineCase = True Then 'true=点線 false=実線
With targetRange.Borders(xlEdgeTop) 'セルの上を指定
.LineStyle = xlDot '点線
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
Else
With targetRange.Borders(xlEdgeTop)
.LineStyle = xlContinuous '実線
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment