Анализ эффективности вложений денежных средств в РКО
Рефераты >> Инвестиции >> Анализ эффективности вложений денежных средств в РКО

Call EndOf

End Sub

Sub ViewDeal()

Sheets("Сделки").Select

Call EndOf

End Sub

Sub ViewClient()

Sheets("Клиенты").Select

Call EndOf

End Sub

Sub ViewBirga()

Sheets("Биржа").Select

Call EndOf

End Sub

Sub ViewOst812()

Sheets("Остатки812").Select

Call EndOf

End Sub

Sub ViewOstBirga()

Sheets("ОстаткиБиржа").Select

Call EndOf

End Sub

Sub ViewProgram()

Sheets("Защита").Select

End Sub

'------------------------------ Печать Депозитария ---------------

Sub PrintDepo()

Dim BumNum; CliNum; i; j; k; a; n; Sign; s As Integer

Dim Flag As Boolean

Dim Code As Long

Dim Str As String

Dim DepoFil() As Integer

Dim Num As Integer

CurDate = Worksheets("Врем").Cells(1; 4)

Call FormBum

Sheets("Депо").Select

BumNum = Worksheets("Врем").Cells(1; 2)

Cells(3; 5) = Worksheets("Врем").Cells(1; 4)

Cells(3; 5).NumberFormat = "Д ММММ, ГГГГ"

Cells(3; 5).HorizontalAlignment = xlCenterAcrossSelection

Cells(3; 5).Font.Bold = True

Num = 9

For i = 1 To BumNum

Cells(6; i + 1) = Worksheets("Врем").Cells(i; 1)

Cells(6; i + 1).Font.Bold = True

Cells(6; i + 1).Interior.ColorIndex = 40

Cells(Num + 1; i + 1).Interior.ColorIndex = 15

Cells(Num + 1; i + 1) = ""

Cells(Num; i + 1).Interior.ColorIndex = 40

Cells(Num; i + 1) = ""

Cells(5; i + 1).Interior.ColorIndex = 40

Next

Cells(Num; 1).Interior.ColorIndex = 40

Cells(Num; 1) = "Итого"

Cells(Num; 1).Font.Bold = True

Cells(Num; 1).Font.Italic = True

Cells(Num; 1).HorizontalAlignment = xlCenter

Cells(Num + 1; 1) = ""

Cells(Num + 1; 1).Interior.ColorIndex = 15

CliNum = Worksheets("Врем").Cells(1; 3)

ReDim DepoArray(CliNum; BumNum)

ReDim DepoFil(BumNum)

a = 2

While Worksheets("Сделки").Cells(a; 1) <> Empty

i = 1

While Worksheets("Клиенты").Cells(i + 1; 2) <> _

Worksheets("Сделки").Cells(a; 2)

If Worksheets("Клиенты").Cells(i + 1; 2) = Empty Then

MsgBox "Неверный номер клиента в Окне 'Сделки' строка: " + CStr(a)

Sheets("Сделки").Select

Cells(a; 2).Select

Exit Sub

End If

i = i + 1

Wend

k = 0

For j = 1 To BumNum

If Worksheets("Врем").Cells(j; 1) = Worksheets("Сделки").Cells(a; 3) Then

k = j

Exit For

End If

Next

If k = 0 Then

a = a + 1

GoTo NNN

End If

If Not IsEmpty(Worksheets("Сделки").Cells(a; 4)) Then

Sign = 1

Else

Sign = -1

End If

If CurDate >= Worksheets("Сделки").Cells(a; 1) Then

If Worksheets("Сделки").Cells(a; 2) = FilialConst Then

DepoFil(k) = DepoFil(k) + Sign * Worksheets("Сделки").Cells(a; 6)

Else

DepoArray(i; k) = DepoArray(i; k) + Sign * Worksheets("Сделки").Cells(a; 6)

End If

End If

a = a + 1

NNN:

Wend

n = 7

For i = 1 To CliNum

Flag = False

For k = 1 To BumNum

If DepoArray(i; k) > 0 Then Flag = True

Next

If Flag Then

Str = Format(Worksheets("Клиенты").Cells(i + 1; 2); "0000000000")

Str = Right(Str; 5)

Cells(n; 1).NumberFormat = "@"

Cells(n; 1).Font.Bold = True

Cells(n; 1).HorizontalAlignment = xlCenter

Cells(n; 1).Font.Italic = False

Cells(n; 1).Interior.ColorIndex = 2

Cells(n; 1) = Str

For k = 1 To BumNum

If DepoArray(i; k) <> 0 Then

Cells(n; k + 1) = DepoArray(i; k)

Else

Cells(n; k + 1) = ""

End If

Cells(n; k + 1).Font.Bold = False

Cells(n; k + 1).Font.Italic = False

Cells(n; k + 1).Interior.ColorIndex = 2

Next

If n = 7 Then

n = n + 4

Else

n = n + 1

End If

End If

Next

'расчет по филиалу

Cells(8; 1) = "Филиал"

Cells(8; 1).Font.Bold = True

Cells(8; 1).HorizontalAlignment = xlCenter

Cells(8; 1).Font.Italic = False

Cells(8; 1).Interior.ColorIndex = 2

For k = 1 To BumNum

If DepoFil(k) <> 0 Then

Cells(8; k + 1) = DepoFil(k)

Else

Cells(8; k + 1) = ""

End If

Cells(8; k + 1).Font.Bold = False

Cells(8; k + 1).Font.Italic = False

Cells(8; k + 1).Interior.ColorIndex = 2

Next

For i = 1 To BumNum

Cells(n; i + 1).Interior.ColorIndex = 40

s = 0

For k = 11 To n - 1

s = s + Cells(k; i + 1)

Next

Cells(n; i + 1).Value = s

Next

For i = 1 To BumNum

Cells(9; i + 1) = Cells(7; i + 1) + Cells(8; i + 1)

Next

Cells(n; 1).Interior.ColorIndex = 40

Cells(n; 1) = "Итого 9998"

Cells(n; 1).Font.Bold = True

Cells(n; 1).Font.Italic = True

Range("A1:Z200").Borders(xlLeft).LineStyle = xlNone

Range("A1:Z200").Borders(xlRight).LineStyle = xlNone

Range("A1:Z200").Borders(xlTop).LineStyle = xlNone

Range("A1:Z200").Borders(xlBottom).LineStyle = xlNone

Range("A1:Z200").BorderAround LineStyle:=xlNone

Range(Cells(5; 1); Cells(n; BumNum + 1)).Borders(xlLeft).Weight = xlThin

Range(Cells(5; 1); Cells(n; BumNum + 1)).Borders(xlRight).Weight = xlThin

Range(Cells(5; 1); Cells(n; BumNum + 1)).Borders(xlTop).Weight = xlThin

Range(Cells(5; 1); Cells(n; BumNum + 1)).Borders(xlBottom).Weight = xlThin

Range(Cells(5; 1); Cells(n; BumNum + 1)).BorderAround Weight:=xlMedium

Range(Cells(n + 1; 1); Cells(100; 30)).Delete shift:=xlToLeft

Range(Cells(1; BumNum + 2); Cells(100; 30)).Delete shift:=xlToLeft

If DialogPrint("Депо"; 1) Then Exit Sub

Call EditOstBirga(DilerConst)

End Sub

'-------------------------------- Печать Отчеты клиентам -----------

Sub PrintOtchClient()

Dim Sheet; Ost812 As Object

Dim i; j; d; a; Col; m; MM; NN; MMM; k; b; q As Long

Dim FlagBuy; FlagCell; FlagDeal; FlagDepo As Boolean

Dim CliNum As Long

Dim ComStr; StrComS As String

Dim BumNum; z; z1; Index As Integer

Dim s; sum; SumBuy; Ost; SumCom; ComBirga; ComDiler; ComSum As Double

Dim Com As Double

Dim OstIn; OstOut; OstBegin; OstEnd As Double

Dim RowNum As Long

Dim OstInDate; OstOutDate As String

Dim DoFlag As Boolean

Dim Auk As Boolean

Set Sheet = Worksheets("Сделки")

Sheet.Range("A2").Sort Key1:=Sheet.Range("A2"); Order1:=xlAscending; _

Key2:=Sheet.Range("B2"); Order2:=xlAscending; _

Key3:=Sheet.Range("D2"); Order3:=xlAscending; _

Header:=xlYes; OrderCustom:=1; _

MatchCase:=False; Orientation:=xlTopToBottom

CurDate = Worksheets("Врем").Cells(1; 4)

Worksheets("ОтчетыИнвесторам").Select


Страница: