アットウィキロゴ
mytips@wiki
掲示板 掲示板 ページ検索 ページ検索 メニュー メニュー

mytips@wiki

DrawBorders-罫線を引く

最終更新:

mytips

- view
管理者のみ編集可

DrawBorders-罫線を引く

Public Sub DrawBorders()
'-- 罫線を引く(外枠:細線、内枠:極細線)
'
   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
   If Selection.Columns.Count > 1 Then
       With Selection.Borders(xlInsideVertical)
           .LineStyle = xlContinuous
           .Weight = xlHairline
           .ColorIndex = xlAutomatic
       End With
   End If
   If Selection.Rows.Count > 1 Then
       With Selection.Borders(xlInsideHorizontal)
           .LineStyle = xlContinuous
           .Weight = xlHairline
           .ColorIndex = xlAutomatic
       End With
   End If
   Selection.Borders(xlDiagonalDown).LineStyle = xlNone
   Selection.Borders(xlDiagonalUp).LineStyle = xlNone
End Sub
最近更新されたスレッド
ウィキ募集バナー