|
发表于 2008-2-2 15:54:26
|
显示全部楼层
分析楼主的Excel中原代码,发现只能做财务方面的报表? 不能做供应链和物料需求等方面的报表?
不知是不是?
哪位有U861的数据辞典啊? 关于供应链方面的
Public QuShu As Object
Public MyODBC As Object
Public int加载标志 As Integer
Sub likaiEnd()
On Error Resume Next
Dim ctl As CommandBarControl
Application.CommandBars("U8_Excel 自动报表助手").Delete
For Each ctl In Application.CommandBars(1).Controls
If ctl.Caption = "U8报表助手(&Z)" Then ctl.Delete
Next ctl
For Each ctl In Application.CommandBars("cell").Controls
If ctl.Caption = "U8报表助手快捷菜单" Then ctl.Delete
'If ctl.Caption = "U8报表助手(&Z)" Then ctl.Delete
Next ctl
For Each ctl In Application.CommandBars("cell").Controls
If ctl.Caption = "重算选定区域(&D)" Then ctl.Delete
Next ctl
For Each ctl In Application.CommandBars("cell").Controls
If ctl.Caption = "重算当前整表(&R)" Then ctl.Delete
Next ctl
For Each ctl In Application.CommandBars("cell").Controls
If ctl.Caption = "联查明细账(&M)" Then ctl.Delete
Next ctl
For Each ctl In Application.CommandBars("cell").Controls
If ctl.Caption = "结果另存为(&S)..." Then ctl.Delete
Next ctl
End Sub
Sub sub设置连接参数()
sub加载类库
QuShu.sub设置连接参数
End Sub
Sub sub设置帐套年度()
sub加载类库
QuShu.sub设置帐套年度
End Sub
Sub sub关于()
sub加载类库
QuShu.sub关于
End Sub
Sub MingXiZhang()
sub加载类库
QuShu.科目明细账
End Sub
Function ztl()
sub加载类库
QuShu.test
ztl = 1
End Function
Sub sub加载类库()
If int加载标志 = 0 Then
Shell "Regsvr32 /s U8取数类_曾福星.dll"
Set QuShu = CreateObject("U8取数类_曾福星.U8取数类")
'Set MyODBC = CreateObject("U8取数类_曾福星.ODBC_ZFX")
int加载标志 = 1
sub增加函数库
End If
End Sub
Sub ReJiSuan()
sub加载类库
QuShu.重新计算整表
End Sub
Sub 初始化()
QuShu.bln初始化
End Sub
Sub XuanDingReSuan()
sub加载类库
QuShu.重算选定单元
End Sub
Public Sub sub增加函数库()
On Error Resume Next
QuShu.sub增加函数库
End Sub
Function getCodeName(cCode As String) As String
QuShu.strCode = cCode
getCodeName = QuShu.取科目名称
End Function
Function MC(cCode As String) As String
On Error Resume Next
QuShu.strCode = cCode
MC = QuShu.取科目名称
End Function
Sub sub退出()
likaiEnd
End Sub
Function QC(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
QC = Round(QuShu.dub借方期初 - QuShu.dub贷方期初, 2)
End Function
Function QCD(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
QCD = Round(QuShu.dub贷方期初, 2)
End Function
Function QCJ(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
QCJ = Round(QuShu.dub借方期初, 2)
End Function
Function NC(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
NC = Round(QuShu.dub借方年初 - QuShu.dub贷方年初, 2)
End Function
Function NCD(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
NCD = Round(QuShu.dub贷方年初, 2)
End Function
Function NCJ(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
NCJ = Round(QuShu.dub贷方年初, 2)
End Function
Function QM(cCode As String) As Double
QuShu.strCode = cCode
QuShu.读写科目缓存
QM = Round(QuShu.dub借方期末 - QuShu.dub贷方期末, 2)
End Function
Function QMJ(cCode As String) As Double
QuShu.strCode = cCode
QuShu.读写科目缓存
QMJ = Round(QuShu.dub借方期末, 2)
End Function
Function QMD(cCode As String) As Double
QuShu.strCode = cCode
QuShu.读写科目缓存
QMD = Round(QuShu.dub贷方期末, 2)
End Function
Function FS(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
FS = Round(QuShu.dub借方发生 - QuShu.dub贷方发生, 2)
End Function
Function FSJ(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
FSJ = Round(QuShu.dub借方发生, 2)
End Function
Function FSD(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
FSD = Round(QuShu.dub贷方发生, 2)
End Function
Function LFS(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
LFS = Round(QuShu.dub借方年累 - QuShu.dub贷方年累, 2)
End Function
Function LFSJ(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
LFSJ = Round(QuShu.dub借方年累, 2)
End Function
Function LFSD(cCode As String) As Double
On Error Resume Next
QuShu.strCode = cCode
QuShu.读写科目缓存
LFSD = Round(QuShu.dub贷方年累, 2)
End Function
Function CFLJ(cCode As String) As Double
If QuShu.余额重分类(cCode) Then CFLJ = Round(QuShu.dub重分类借方余额, 2)
End Function
Function CFLD(cCode As String) As Double
If QuShu.余额重分类(cCode) Then CFLD = Round(QuShu.dub重分类贷方余额, 2)
End Function
Sub 缓存现金流()
cCodeLst = "现金;库存现金;银行存款;其他货币资金;"
QuShu.str现金流量科目列 = cCodeLst
QuShu.sub缓存现金流量
QuShu.求总现金流量
End Sub
Function ZXJLJ() As Double
If QuShu.l = 0 Then 缓存现金流
ZXJLJ = QuShu.dub借方流量总额
End Function
Function ZXJLD() As Double
If QuShu.l = 0 Then 缓存现金流
ZXJLD = QuShu.dub贷方流量总额
End Function
Function XJLJ(cCode As String) As Double
If QuShu.l = 0 Then 缓存现金流
QuShu.strCode = cCode
QuShu.求现金流量
XJLJ = QuShu.dub借方流量
End Function
Function XJLD(cCode As String) As Double
If QuShu.l = 0 Then 缓存现金流
QuShu.strCode = cCode
QuShu.求现金流量
XJLD = QuShu.dub贷方流量
End Function
Function QDM(cCode As String) As Double
QDM = QuShu.fun名称取科目(cCode)
End Function
Function XJLR(cCode As String) As Double
XJLR = XJLJ(cCode)
End Function
Function XJLC(cCode As String) As Double
XJLC = XJLD(cCode)
End Function
Function XJZLC() As Double
XJZLC = ZXJLD()
End Function
Function XJZLR() As Double
XJZLR = ZXJLJ()
End Function
Sub sub保存实例()
sub加载类库
QuShu.sub保存实例
End Sub |
|