|
'*************************************************************************
' ("E15:AF15") と ("E30:AF30")
'*************************************************************************
Selection.Borders(xlInsideVertical).LineStyle = xlNone
If count2 = 1 Then
Range(Cells(15 + 31 * (count1 - 1), "E"), Cells(15 + 31 * (count1 - 1), "AF")).Select
Else
Range(Cells(30 + 31 * (count1 - 1), "E"), Cells(30 + 31 * (count1 - 1), "AF")).Select
End If
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
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
'*************************************************************************
' ("E16:AF16") と ("E31:AF31")
'*************************************************************************
Selection.Borders(xlInsideVertical).LineStyle = xlNone
If count2 = 1 Then
Range(Cells(16 + 31 * (count1 - 1), "E"), Cells(16 + 31 * (count1 - 1), "AF")).Select
Else
Range(Cells(31 + 31 * (count1 - 1), "E"), Cells(31 + 31 * (count1 - 1), "AF")).Select
End If
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
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
'*************************************************************************
' ("B3:B16") と ("B18:B31")
'*************************************************************************
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("R17").Select
ActiveWindow.SmallScroll Down:=-6
If count2 = 1 Then
Range(Cells(3 + 31 * (count1 - 1), "B"), Cells(16 + 31 * (count1 - 1), "B")).Select
Else
Range(Cells(18 + 31 * (count1 - 1), "B"), Cells(31 + 31 * (count1 - 1), "B")).Select
End If
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
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
'*************************************************************************
' ("C4:C16") と ("C19:C31")
'*************************************************************************
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
If count2 = 1 Then
Range(Cells(4 + 31 * (count1 - 1), "C"), Cells(16 + 31 * (count1 - 1), "C")).Select
Else
Range(Cells(19 + 31 * (count1 - 1), "C"), Cells(31 + 31 * (count1 - 1), "C")).Select
End If
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
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
|
|