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

Range(Cells(m + 4; 2); Cells(MMM - 1; 6)).Borders(xlLeft).Weight = xlThin

Range(Cells(m + 4; 2); Cells(MMM - 1; 6)).Borders(xlRight).Weight = xlThin

Range(Cells(m + 4; 2); Cells(MMM - 1; 6)).Borders(xlTop).Weight = xlThin

Range(Cells(m + 4; 2); Cells(MMM - 1; 6)).Borders(xlBottom).Weight = xlThin

Range(Cells(m + 4; 2); Cells(MMM - 1; 6)).BorderAround Weight:=xlMedium

End If

' ------------------------------------------------------

' - расчет остатков

Set Ost812 = Worksheets("Остатки812")

Ost812.Range("B2").Sort Key1:=Ost812.Range("B2"); Order1:=xlAscending; _

Key2:=Ost812.Range("A2"); Order2:=xlDescending; _

Header:=xlYes; OrderCustom:=1; _

MatchCase:=False; Orientation:=xlTopToBottom

OstIn = 0

OstOut = 0

OstBegin = 0

OstInDate = ""

OstOutDate = ""

RowNum = 0

k = 2

DoFlag = True

Do While Ost812.Cells(k; 1) <> Empty

If Ost812.Cells(k; 2) = CliNum And DoFlag Then

If Ost812.Cells(k; 1) < CurDate Then

OstBegin = Ost812.Cells(k; 8)

Else

Do While Ost812.Cells(k; 1) <> Empty

If Ost812.Cells(k; 2) <> CliNum Then Exit Do

If Ost812.Cells(k; 1) = CurDate Then

OstBegin = Ost812.Cells(k; 3)

OstIn = Ost812.Cells(k; 4)

OstInDate = Ost812.Cells(k; 5)

OstOut = Ost812.Cells(k; 6)

OstOutDate = Ost812.Cells(k; 7)

RowNum = k

Exit Do

End If

k = k + 1

Loop

End If

DoFlag = False

End If

k = k + 1

Loop

If RowNum = 0 Then RowNum = k

k = RowNum

' - начало таблицы

With DialogSheets("ДиалогКлиент")

.Labels(8).Text = Cells(4; 4) ' Клиент

.Labels(9).Text = sum ' Сумма сделки

.Labels(10).Text = CurDate ' Дата текущая

.Labels(17).Text = CliNum

If CliNum = FilialConst Then .Labels(17).Text = DilerConst

.EditBoxes(1).Text = "0" ' Сумма списания

.EditBoxes(1).InputType = xlNumber

.EditBoxes(2).Text = CurDate ' Дата сделки

.EditBoxes(7).Text = OstOutDate ' списано (дата)

.EditBoxes(8).Text = OstOut ' списано (сумма)

.EditBoxes(8).InputType = xlNumber

.EditBoxes(9).Text = OstInDate ' перечислено (дата)

.EditBoxes(10).Text = OstIn ' перечислено (сумма)

.EditBoxes(10).InputType = xlNumber

Com = 0,00015

Select Case SumCom

Case Is < 36000

Com = 0,005

Case Is < 51000

Com = 0,004

Case Is < 101000

Com = 0,003

Case Is < 301000

Com = 0,002

Case Is < 501000

Com = 0,001

Case Is < 1001000

Com = 0,0005

Case Is < 3001000

Com = 0,00025

End Select

If Cells(4; 4) = "Универсалбанк" Then Com = 0

.EditBoxes(3).Text = Com ' Комиссия дилера

.EditBoxes(3).InputType = xlNumber

.EditBoxes(4).Text = "0" ' Сумма вознаграждения дилера

.EditBoxes(4).InputType = xlNumber

.EditBoxes(5).Text = "" ' Запись о вознаграждении

.EditBoxes(6).Text = OstBegin ' Остаток на 812 счете клиента

.EditBoxes(6).InputType = xlNumber

Cells(MMM + 3; 1) = "Начальник инвестиционно-аналитического отдела _"

Cells(MMM + 3; 6) = ""

Again:

Просмотр = False

ExitVar = False

Button = False

.Show

If .EditBoxes(1).Text = "" Then .EditBoxes(1).Text = 0

If .EditBoxes(3).Text = "" Then .EditBoxes(3).Text = 0

If .EditBoxes(4).Text = "" Then .EditBoxes(4).Text = 0

If .EditBoxes(6).Text = "" Then .EditBoxes(6).Text = 0

If .EditBoxes(8).Text = "" Then .EditBoxes(8).Text = 0

If .EditBoxes(10).Text = "" Then .EditBoxes(10).Text = 0

Cells(21; 1) = .EditBoxes(5).Text ' Запись о вознаграждении

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

Cells(6; 4) = .EditBoxes(2).Text ' Дата сделки

' занесение данных в итоговую таблицу

Cells(10; 6) = .EditBoxes(6).Text ' Входящий остаток

OstBegin = .EditBoxes(6).Text

Cells(14; 6) = SumBuy

Cells(15; 6) = sum - SumBuy

ComStr = Format(SumCom * .EditBoxes(3).Text; "0,00")

ComDiler = CDbl(ComStr)

Cells(16; 6) = ComBirga

Cells(18; 6) = ComDiler

Cells(20; 6) = .EditBoxes(4).Text

Cells(11; 6) = .EditBoxes(8).Text

OstOut = .EditBoxes(8).Text

OstIn = .EditBoxes(10).Text

Cells(12; 6) = .EditBoxes(10).Text

Cells(13; 6) = .EditBoxes(6).Text - .EditBoxes(8).Text + .EditBoxes(10).Text

Cells(11; 1) = "2.Списано на р/с / выдано наличными " + .EditBoxes(7).Text

OstInDate = .EditBoxes(9).Text

OstOutDate = .EditBoxes(7).Text

Cells(12; 1) = "3.Перечислено на покупку " + .EditBoxes(9).Text

Cells(22; 6) = 2 * SumBuy - sum + ComBirga + ComDiler

Cells(23; 6) = .EditBoxes(1).Text

Cells(24; 6) = .EditBoxes(6).Text - .EditBoxes(8).Text + .EditBoxes(10).Text - _

(2 * SumBuy - sum + ComBirga + ComDiler) - _

.EditBoxes(1).Text - .EditBoxes(4).Text

OstEnd = Cells(24; 6)

Ost812.Cells(k; 1) = CurDate

Ost812.Cells(k; 2) = CliNum

Ost812.Cells(k; 3) = OstBegin

Ost812.Cells(k; 4) = OstIn

Ost812.Cells(k; 5) = OstInDate

Ost812.Cells(k; 6) = OstOut

Ost812.Cells(k; 7) = OstOutDate

Ost812.Cells(k; 8) = OstEnd

Ost812.Cells(k; 9) = Cells(14; 6) + Cells(15; 6)

Ost812.Cells(k; 10) = Cells(16; 6)

Ost812.Cells(k; 11) = Cells(18; 6)

Call EditOstBirga(CliNum)

' конец занесения данных

If Просмотр Then

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

GoTo Again

End If

If Button Then ActiveWindow.SelectedSheets.PrintOut copies:=2

If ExitVar Then Exit Sub

End With

' печать мемориальных ордеров

Dim StrS As String

Auk = False

With DialogSheets("ДиалогОперация")

.Show

If .OptionButtons(1).Value = xlOn Then StrS = "Покупка"

If .OptionButtons(2).Value = xlOn Then StrS = "Продажа"

If .OptionButtons(3).Value = xlOn Then StrS = "Погашение"

If .OptionButtons(4).Value = xlOn Then StrS = "Покупка / Продажа"

If .OptionButtons(5).Value = xlOn Then StrS = "Покупка / Погашение"

If .OptionButtons(5).Value = xlOn Then Auk = True

End With

Worksheets("Ордер").Select

Dim Pos812 As Integer

Dim Page; Page1 As Object

Set Page = Worksheets("ОтчетыИнвесторам")

Set Page1 = Worksheets("Клиенты")

Pos812 = 2

While (Page1.Cells(Pos812; 1) <> Empty) And (Worksheets("Клиенты").Cells(Pos812; 2) <> CliNum)

Pos812 = Pos812 + 1

Wend

If Page.Cells(14; 6) - Page.Cells(15; 6) > 0 Then

If MemoOrder(Index; Page.Cells(14; 6) - Page.Cells(15; 6); 6; 7; Pos812; _

StrS + " РКО за " + CStr(CurDate)) Then Exit Sub

Index = Index + 1

Else

If MemoOrder(Index; Page.Cells(15; 6) - Page.Cells(14; 6); 7; 6; Pos812; _


Страница: