📄 frmyh_yhdzphcheck.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form frmYH_YhdzPhCheck
BorderStyle = 3 'Fixed Dialog
Caption = "对账平衡检查"
ClientHeight = 2715
ClientLeft = 45
ClientTop = 330
ClientWidth = 5235
Icon = "frmYH_YhdzPhCheck.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2715
ScaleWidth = 5235
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdOk
Caption = "确定(&O)"
Default = -1 'True
Height = 345
Left = 3285
TabIndex = 1
Top = 2130
Width = 1065
End
Begin MSFlexGridLib.MSFlexGrid mfgPhcheck
Height = 1890
Left = 135
TabIndex = 0
Top = 135
Width = 4980
_ExtentX = 8784
_ExtentY = 3334
_Version = 393216
Cols = 3
BackColorBkg = 12632256
AllowUserResizing= 1
FormatString = "平衡检查|<单位方|<银行方"
End
Begin VB.Shape shpBalance
BorderColor = &H00000000&
Height = 405
Left = 555
Top = 2130
Width = 855
End
Begin VB.Label lblBalance
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "不平衡"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 555
TabIndex = 2
Top = 2250
Width = 825
End
End
Attribute VB_Name = "frmYH_YhdzPhCheck"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public IsBalance As Boolean
Private Sub cmdOk_Click()
Me.Hide
End Sub
Private Sub Form_Activate()
Call form_load
End Sub
Private Sub form_load()
Dim i As Integer
Dim IncomeSumDwf As Double '单位方收入合计
Dim OutLaySumDwf As Double '单位方支出合计
Dim IncomeSumYhf As Double '银行方收入合计
Dim OutLaySumYhf As Double '银行方支出合计
IncomeSumDwf = 0
OutLaySumDwf = 0
IncomeSumYhf = 0
OutLaySumYhf = 0
IsBalance = False
With frmYH_Yhdz.mfgDwrjz
For i = 1 To .Rows - 1
If .TextMatrix(i, 9) <> "" And .RowHeight(i) > 1 Then
If .TextMatrix(i, 7) = "借" Then
IncomeSumDwf = IncomeSumDwf + Val(Format(.TextMatrix(i, 8), "###0.00"))
Else
OutLaySumDwf = OutLaySumDwf + Val(Format(.TextMatrix(i, 8), "###0.00"))
End If
End If
Next i
End With
With frmYH_Yhdz.mfgYhdzd
For i = 1 To .Rows - 1
If .TextMatrix(i, 6) <> "" And .RowHeight(i) > 1 Then
If .TextMatrix(i, 4) = "贷" Then
IncomeSumYhf = IncomeSumYhf + Val(Format(.TextMatrix(i, 5), "###0.00"))
Else
OutLaySumYhf = OutLaySumYhf + Val(Format(.TextMatrix(i, 5), "###0.00"))
End If
End If
Next i
End With
With mfgPhcheck
.ColWidth(0) = 1000
.ColWidth(1) = 1900
.ColWidth(2) = 1900
.ColAlignment(0) = 4
.ColAlignment(1) = 7
.ColAlignment(2) = 7
.Rows = 1
.row = 0
.col = 1
.CellAlignment = 4
.col = 2
.CellAlignment = 4
.AddItem "收入合计:" & vbTab & IncomeSumDwf & vbTab & IncomeSumYhf & vbTab & 1
.AddItem "支出合计:" & vbTab & OutLaySumDwf & vbTab & OutLaySumYhf & vbTab & 2
.TextMatrix(1, 1) = Format(.TextMatrix(1, 1), "#,###0.00")
.TextMatrix(1, 2) = Format(.TextMatrix(1, 2), "#,###0.00")
.TextMatrix(2, 1) = Format(.TextMatrix(2, 1), "#,###0.00")
.TextMatrix(2, 2) = Format(.TextMatrix(2, 2), "#,###0.00")
End With
If Abs((IncomeSumDwf - IncomeSumYhf) - (OutLaySumDwf - OutLaySumYhf)) > 0.009 Then
shpBalance.BorderColor = vbRed
lblBalance.Caption = "不平衡"
lblBalance.ForeColor = vbBlack
IsBalance = False
Else
shpBalance.BorderColor = vbGreen
lblBalance.Caption = "平衡"
lblBalance.ForeColor = vbBlack
IsBalance = True
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -