Sub macro100327a() 'LineStyle見本
SheetAddCDel ("LineStyle見本") Dim i As Integer, j As Integer Dim ValueLineStyle, StrLineStyle As Variant Dim ValueLineWeight, StrLineWeight As Variant ValueLineStyle = Array(xlContinuous, xlDash, xlDashDot, _ xlDashDotDot, xlDot, xlDouble, xlSlantDashDot, xlLineStyleNone) StrLineStyle = Array("xlContinuous", "xlDash", "xlDashDot", _ "xlDashDotDot", "xlDot", "xlDouble", "xlSlantDashDot", "xlLineStyleNone") ValueLineWeight = Array(xlHairline, xlThin, xlMedium, xlThick) StrLineWeight = Array("xlHairline", "xlThin", "xlMedium", "xlThick") Cells(1, 1) = "LineStyle/Weight" For i = 0 To 3 Cells(1, 3 + i * 2) = StrLineWeight(i) Range(toA1("C" & 2 + i * 2)).ColumnWidth = 2 Next i For i = 0 To 7 Range("A" & 3 + 2 * i) = StrLineStyle(i) With Range("C" & 3 + 2 * i).Borders .LineStyle = ValueLineStyle(i) .Weight = ValueLineWeight(0) End With With Range("E" & 3 + 2 * i).Borders .LineStyle = ValueLineStyle(i) .Weight = ValueLineWeight(1) End With With Range("G" & 3 + 2 * i).Borders .LineStyle = ValueLineStyle(i) .Weight = ValueLineWeight(2) End With With Range("I" & 3 + 2 * i).Borders .LineStyle = ValueLineStyle(i) .Weight = ValueLineWeight(3) End With Next i Columns(1).AutoFit End Sub |
コメント