63
MakeFrameBorder MyWindow.ActiveSheet.Cells(iCurRow, iCurCol).Address,
MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + 1).Address
End If
If dDay = 3 Or dDay = 7 Then
MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + iHours + 1).Value = "№"
With MyWindow.ActiveSheet.Cells(iCurRow + 1, iCurCol + iHours + 1)
.Value = "взвод"
.Font.Name = "MS Serif"
.Font.Size = 8
End With
MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + iHours + 1).Value = "№"
With MyWindow.ActiveSheet.Cells(iCurRow + 17, iCurCol + iHours + 1)
.Value = "взвод"
.Font.Name = "MS Serif"
.Font.Size = 8
End With
MakeFrameBorder MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + iHours).Address,
MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + iHours + 1).Address
End If
' Расстановка часов по дням
MakeFrameBorder MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + 1).Address,
MyWindow.ActiveSheet.Cells(iCurRow + 1, iCurCol + iHours).Address
MakeFrameBorder MyWindow.ActiveSheet.Cells(iCurRow + 17, iCurCol + 1).Address,
MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + iHours).Address
For iHourCounter = 1 To iHours 'цикл по часам в дне dDay
MyWindow.ActiveSheet.Cells(iCurRow + 1, iCurCol + iHourCounter).Value =
iHourCounter
MyWindow.ActiveSheet.Cells(iCurRow + 17, iCurCol + iHourCounter).Value =
iHourCounter
Next
If dDay < 7 Then
MergeCellsText MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + 1).Address,
MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + iHours).Address, WeekdayName(dDay) & "
- " & FormatDateTime(dStartWeekDay + dDay - 1, vbLongDate)
MergeCellsText MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + 1).Address,
MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + iHours).Address,
WeekdayName(dDay) & " - " & FormatDateTime(dStartWeekDay + dDay - 1, vbLongDate)
Else
MergeCellsText MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + 1).Address,
MyWindow.ActiveSheet.Cells(iCurRow, iCurCol + iHours).Address, WeekdayName(dDay)
MergeCellsText MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + 1).Address,
MyWindow.ActiveSheet.Cells(iCurRow + 18, iCurCol + iHours).Address,
WeekdayName(dDay)
End If
' Расстановка взводов
For i = 4 To 6 'Роты
MakeFrameBorder MyWindow.ActiveSheet.Cells(iCurRow + (i - 1) * 5 - 13, iCurCol +
1).Address, MyWindow.ActiveSheet.Cells(iCurRow + i * 5 - 14, iCurCol + iHours).Address