Private Sub Label21_Click() On Error GoTo er Dim i As Byte ‘I‘ð”ÍˆÍ iro = 1 If syurui = "" Then iro = 0 For i = y1 To y2 Step sen With ActiveSheet.Range(Cells(i, x1), Cells(i, x2)) If iro = 1 Then .Borders(xlEdgeTop).LineStyle = xlContinuous .Borders(xlEdgeTop).Weight = syurui .Borders(xlEdgeTop).Color = myRGB Else .Borders(xlEdgeTop).LineStyle = xlNone End If End With Next i Exit Sub er: End Sub