Sub Macro1() Dim rr As Range Set rr = Selection rr.Parent.Shapes.AddLine(rr.Left, rr.Top + rr.Height, rr.Left + rr.Width, rr.Top + rr.Height).Select With Selection.ShapeRange.Line .Weight = 1 .ForeColor.RGB = RGB(0, 0, 0) '255,255,153 薄いイエロー 204,255,255 薄いブルー End With rr.Select End Sub
Sub Macro2() Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlHairline 'xlThin .ColorIndex = xlAutomatic End With End Sub Macro1が直線を引く場合 Macro2が罫線を引く場合 Weight = 1を0.5にしても変わらない xlHairline細線xlThin極細 直線を引くと消す作業が必要に成る