资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:3k
源码类别:
企业管理
开发平台:
Visual Basic
- Attribute VB_Name = "Module_dzbb"
- Option Explicit
- Public Curr_sys As String
- Public gfrm_edit As Frm_edit
- Public ls_xtbm As Variant
- Public song_temp As Variant '
- Public song_flag As Boolean '监测是否为文件存为模板
- Public song_row As Long, song_col As Long '读取Excel文件的行列
- Public Edit_Flag As Boolean '报表数据修改标志
- Public Function max(ByVal parm1 As Long, ByVal parm2 As Long)
- If parm1 >= parm2 Then max = parm1
- If parm1 < parm2 Then max = parm2
- End Function
- Public Function min(ByVal parm1 As Long, ByVal parm2 As Long)
- If parm1 >= parm2 Then min = parm2
- If parm1 < parm2 Then min = parm1
- End Function
- Public Function mf_exchange_nyr(ByVal ls_time As String) As String '年月日转换函数
- Dim ldb_time As Double, ll_time As Long
- Select Case ls_time
- Case "本年", "今年", "该年", "当年"
- mf_exchange_nyr = CStr(Xtyear)
- Exit Function
- Case "去年", "上一年", "上年"
- mf_exchange_nyr = CStr(Xtyear - 1)
- Exit Function
- Case "本月", "当月", "该月"
- mf_exchange_nyr = CStr(Xtmm)
- Exit Function
- Case "上月", "上个月", "上一个月"
- mf_exchange_nyr = CStr(IIf(Xtmm = 1, 1, Xtmm - 1))
- Exit Function
- Case Else
- If Not IsNumeric(ls_time) Then
- mf_exchange_nyr = -100
- Exit Function
- End If
- ldb_time = CDbl(ls_time)
- ll_time = CLng(ls_time)
- If ll_time <> ldb_time Then
- mf_exchange_nyr = -100
- Exit Function
- End If
- mf_exchange_nyr = IIf(Len(ls_time) < 2, "0" & ls_time, ls_time)
- End Select
- End Function
- Public Function mf_exchange_nyr_Bak(ByVal ls_time As String) As String '年月日转换函数
- Dim ldb_time As Double, ll_time As Long
- Select Case ls_time
- Case "本年", "今年", "该年", "当年"
- mf_exchange_nyr_Bak = CStr(Year(Xtrq))
- Exit Function
- Case "去年", "上一年", "上年"
- mf_exchange_nyr_Bak = CStr(Year(Xtrq) - 1)
- Exit Function
- Case "本月", "当月", "该月"
- mf_exchange_nyr_Bak = IIf(Len(CStr(Month(Xtrq))) < 2, "0" & CStr(Month(Xtrq)), CStr(Month(Xtrq)))
- Exit Function
- Case "上月", "上个月", "上一个月"
- mf_exchange_nyr_Bak = IIf(Len(CStr(Month(Xtrq) - 1)) < 2, "0" & CStr(Month(Xtrq) - 1), CStr(Month(Xtrq) - 1))
- Exit Function
- Case Else
- If Not IsNumeric(ls_time) Then
- mf_exchange_nyr_Bak = -100
- Exit Function
- End If
- ldb_time = CDbl(ls_time)
- ll_time = CLng(ls_time)
- If ll_time <> ldb_time Then
- mf_exchange_nyr_Bak = -100
- Exit Function
- End If
- mf_exchange_nyr_Bak = IIf(Len(ls_time) < 2, "0" & ls_time, ls_time)
- End Select
- End Function
- Function deleteword(ByVal parent As String, son As String) As String '从PARENT中删除一个固定字符SON
- Dim a As String
- If InStr(1, parent, son) <> 0 Then
- a = Left(parent, InStr(1, parent, son) - 1)
- parent = a & Mid(parent, InStr(1, parent, son) + 1)
- deleteword = deleteword(parent, son)
- Else
- deleteword = parent
- Exit Function
- End If
- End Function