| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 677 人关注过本帖
标题:444
只看楼主 加入收藏
haoliaos
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2007-4-6
收藏
 问题点数:0 回复次数:8 
444

Private Sub mnucbqd_Click()
打印 Preview, "用户抄表清单"
End Sub

Private Sub mnuyhcbqd_Click()
打印 True, "用户抄表清单"
End Sub

Private Sub mnuylcbqd_Click()
打印 False, "用户抄表清单"
End Sub

Private Sub m抄部分表_Click()
Dim obj As Object
Set obj = CreateObject("财务抄表.clscbM165")
Set obj.mycns = mycns
obj.抄部分表
Set obj = Nothing

End Sub

Private Sub m抄所有表_Click()
Dim obj As Object
Set obj = CreateObject("财务抄表.clscbM165")
Set obj.mycns = mycns
obj.抄所有表
Set obj = Nothing

End Sub

Private Sub pop_pub_Click()
打印 Preview, "公用表抄表清单"
End Sub

Private Sub pop_unit_Click()
打印 Preview, "单元表抄表清单"
End Sub

Private Sub pubgrid_KeyPressEdit(ByVal row As Long, ByVal col As Long, KeyAscii As Integer)
If KeyAscii = 13 Then
If pubgrid.row < pubgrid.Rows - 1 Then pubgrid.row = pubgrid.row + 1
End If
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error GoTo e:
Dim adoTmp As New ADODB.Recordset
'Dim Myhour As New CHourGlass
Select Case Button.Key
Case "打印"
Preview = True
PopupMenu pop_print
Case "预览"
Preview = False
PopupMenu pop_print
Case "结束"
If 权限("结束抄表") Then
strmsg = " 如果进行此操作,您将结束本次单元表抄表并开始一次新的抄表任务,系统将采用文本框中的内容对本次抄表进行标志,您确定吗?"
MilterTab.Tab = 0
frmNewMilter.Show vbModal
If Not frmNewMilter.Cancel Then
nextMilter
' CboUnitPeriod.ListIndex = 0
If MilterTab.Tab = 1 Then
CboPubMilter.ListIndex = 0
Else
CboUnitPeriod.ListIndex = 0
CboUnitMilter.ListIndex = 0
End If

End If
End If
Case "删除"
If Not 权限("删除抄表记录") Then Exit Sub

If Trim(CboUnitPeriod.Text) = "<当前抄表期间>" Then
MsgBox "当前抄表期间的抄表不能删除!", vbInformation, soft
Exit Sub
End If
If MsgBox("您确定删除" & CboUnitPeriod.Text & "的抄表吗 ?", vbQuestion + vbYesNo, soft) = vbYes Then
mycns.execute "delete from 单元表抄表 where 抄表终止日期='" & Trim(CboUnitPeriod.Text) & "'"
mycns.execute "delete from 公用表抄表 where 抄表终止日期='" & Trim(CboUnitPeriod.Text) & "'"

Dim i As Integer
For i = 0 To CboUnitPeriod.ListCount - 1
If Trim(CboUnitPeriod.List(i)) = Trim(CboUnitPeriod.Text) Then
CboUnitPeriod.RemoveItem i
Exit For
End If
Next
unitgrid.Rows = 1
pubgrid.Rows = 1
CboUnitPeriod.Text = ""
waitfresh
End If
Case "帮助"
' m_contains_Click
frm_help_抄表.Show
Case "退出"
Unload Me

'*************2004/08/09********
Case "保存"
If (Trim(CboUnitPeriod.Text) <> "<当前抄表期间>") Then
If MsgBox("是否将读数更改到<当前抄表期间中>吗?", vbInformation + vbOKCancel, soft) = vbOK Then
mycns.execute "UPDATE 单元表抄表 set 单元表抄表.上次读数=B.本次读数,单元表抄表.本次读数=B.本次读数 FROM(SELECT * FROM 单元表抄表 WHERE 抄表终止日期='" & Trim(CboUnitPeriod.Text) & "') AS B WHERE 单元表抄表.单元编号=B.单元编号 and 单元表抄表.表名称=B.表名称 and 单元表抄表.抄表终止日期='<当前抄表期间>'"
MsgBox "<当前抄表期间>记录已更新!", vbInformation + vbOKOnly, soft
End If
Else
Exit Sub
End If
'*************2004/08/09******************

Case "刷新"
makewhere
Case "XLS"
If MilterTab.Tab = 0 Then
exportExcel unitgrid
Else
exportExcel pubgrid
End If
End Select
Exit Sub
e: MsgBox Err.Description, vbCritical + vbOKOnly, soft
End Sub

Sub nextMilter()
Dim i As Integer
Dim strGrid As String
Dim mycmd As New Command, pin1 As Parameter, pin2 As Parameter
mycmd.ActiveConnection = mycns
mycmd.CommandText = "sp抄表"
mycmd.CommandType = adCmdStoredProc
Set pin1 = mycmd.CreateParameter("jsrq", adVarWChar, adParamInput, 50, frmNewMilter.strValue)
mycmd.Parameters.Append pin1
mycmd.execute

CboUnitPeriod.AddItem frmNewMilter.strValue
End Sub

Private Sub UnitGrid_AfterEdit(ByVal row As Long, ByVal col As Long)
On Error GoTo e:
With unitgrid
bolEdit = True
' If Not IsNumeric(.TextMatrix(row, col)) Then
' If col = FindCol(unitgrid, "上次读数") Then .TextMatrix(row, col) = .TextMatrix(row, FindCol(unitgrid, "本次读数")) - .TextMatrix(row, FindCol(unitgrid, "行度"))
' If col = FindCol(unitgrid, "本次读数") Then .TextMatrix(row, col) = .TextMatrix(row, FindCol(unitgrid, "上次读数"))
' If col = FindCol(unitgrid, "行度") Then .TextMatrix(row, col) = .TextMatrix(row, FindCol(unitgrid, "本次读数")) - .TextMatrix(row, FindCol(unitgrid, "上次读数"))
'
' End If
.Select row, col
.SetFocus
Dim scxd As Currency, bcxd As Currency, bl As Integer, lc As Integer
scxd = val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
bcxd = .ValueMatrix(row, FindCol(unitgrid, "本次读数"))
bl = .Cell(flexcpValue, row, FindCol(unitgrid, "倍率"))
lc = .Cell(flexcpValue, row, FindCol(unitgrid, "量程"))

'**********2004/08/09***********
If col = FindCol(unitgrid, "行度") Then
If val(.TextMatrix(row, FindCol(unitgrid, "行度"))) > 10 ^ lc Then
MsgBox "本次行度超过量程,出错!", vbInformation, soft
End If
If val(.TextMatrix(row, FindCol(unitgrid, "行度"))) > CStr(txtext.Text) Then
MsgBox "你的本次行度大于预警数,请确认是否正确!", vbInformation, soft
End If
.TextMatrix(row, FindCol(unitgrid, "本次读数")) = scxd + val(.TextMatrix(row, FindCol(unitgrid, "行度"))) / bl 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If
If col = FindCol(unitgrid, "上次读数") Then
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl) 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If
If col = FindCol(unitgrid, "本次读数") Then
If bcxd > 10 ^ lc Then
MsgBox "本次读数超过量程,出错!", vbInformation, soft
Else
If bcxd < scxd Then
If MsgBox("你输入的本次读数小于小次读数,是否确认归零?", vbQuestion + vbYesNo, soft) = vbYes Then
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl) 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If
End If
End If
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl)
If val(.TextMatrix(row, FindCol(unitgrid, "行度"))) > CStr(txtext.Text) Then
MsgBox "你的行度大于预警数,请确认是否正确!", vbInformation, soft
End If
End If
If col = FindCol(unitgrid, "倍率") Then
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl) 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If
'**********2004/08/09***********

' If col = FindCol(unitgrid, "本次读数") Then
' .TextMatrix(row, FindCol(unitgrid, "行度")) = val(.TextMatrix(row, FindCol(unitgrid, "本次读数"))) - val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
' End If

If col = FindCol(unitgrid, "行度") Then
.TextMatrix(row, FindCol(unitgrid, "本次读数")) = scxd + val(.TextMatrix(row, FindCol(unitgrid, "行度"))) / bl 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If
If col = FindCol(unitgrid, "上次读数") Then
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl) 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If
If col = FindCol(unitgrid, "本次读数") Then
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl) 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If

If col = FindCol(unitgrid, "倍率") Then
.TextMatrix(row, FindCol(unitgrid, "行度")) = IIf(bcxd - scxd >= 0, (bcxd - scxd) * bl, (10 ^ lc + bcxd - scxd) * bl) 'val(.TextMatrix(row, FindCol(unitgrid, "行度"))) + val(.TextMatrix(row, FindCol(unitgrid, "上次读数")))
End If


If bcxd - scxd < 0 Then
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = &HC0C0FF
Else
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
End If
检查用量
If Not IsNull(.TextMatrix(row, FindCol(unitgrid, "id"))) And Trim(.TextMatrix(row, FindCol(unitgrid, "id"))) <> "" Then
mycns.execute " update 单元表抄表 set 行度=" & .TextMatrix(row, FindCol(unitgrid, "行度")) & " , 本次读数=" & .TextMatrix(row, FindCol(unitgrid, "本次读数")) & ", 上次读数=" & .TextMatrix(row, FindCol(unitgrid, "上次读数")) & ", 倍率=" & .TextMatrix(row, FindCol(unitgrid, "倍率")) & " ,备注='" & .TextMatrix(row, FindCol(unitgrid, "备注")) & "' where id=" & .TextMatrix(row, FindCol(unitgrid, "id"))
End If
End With

Exit Sub
e: MsgBox Err.Description, vbInformation, soft
End Sub

Private Sub 检查用量()
On Error GoTo e:
With unitgrid
Select Case 最高用量
Case 0

' unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
Case 1
If .ValueMatrix(.row, .Cols - 1) > 0 Then
If val(unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度"))) > .ValueMatrix(.row, .Cols - 1) Then
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = &HC0C0FF
Exit Sub
Else
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
End If
End If
Case 2
If .ValueMatrix(.row, .Cols - 1) > 0 Then
If val(unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度"))) > .ValueMatrix(.row, .Cols - 1) Then
unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度")) = .ValueMatrix(.row, .Cols - 1)
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
Exit Sub
Else
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
End If
End If
End Select


Select Case 最低用量
Case 0
' unitgrid.Cell(flexcpBackColor, .row, .col) = vbWhite
Case 1
If .ValueMatrix(.row, .Cols - 2) > 0 Then
If val(unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度"))) < .ValueMatrix(.row, .Cols - 2) Then
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = &HC0C0FF
Else
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
End If
End If
Case 2
If .ValueMatrix(.row, .Cols - 2) > 0 Then

If val(unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度"))) < .ValueMatrix(.row, .Cols - 2) Then
If val(unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度"))) <> 0 Then 'qinyong050708
unitgrid.Cell(flexcpText, .row, FindCol(unitgrid, "行度")) = .ValueMatrix(.row, .Cols - 2)
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
End If
Else
unitgrid.Cell(flexcpBackColor, .row, 0, .row, 11) = vbWhite
End If
End If
End Select

End With
Exit Sub
e: MsgBox Err.Description, vbCritical + vbOKOnly, soft
End Sub

Private Sub UnitGrid_BeforeEdit(ByVal row As Long, ByVal col As Long, Cancel As Boolean)
If col = FindCol(unitgrid, "本次读数") Or col = FindCol(unitgrid, "行度") Or col = FindCol(unitgrid, "上次读数") Or col = FindCol(unitgrid, "备注") Or col = FindCol(unitgrid, "倍率") Then
Cancel = False
Else
Cancel = True
End If
End Sub

Private Sub pubGrid_AfterEdit(ByVal row As Long, ByVal col As Long)
On Error GoTo doit:
Dim bcrow As Long, Scrow As Long
bolEdit = True
With pubgrid
bolEdit = True
' If Not IsNumeric(.TextMatrix(row, col)) Then
' If col = FindCol(pubgrid, "上次读数") Then .TextMatrix(row, col) = .TextMatrix(row, FindCol(pubgrid, "本次读数")) - .TextMatrix(row, FindCol(pubgrid, "行度"))
' If col = FindCol(pubgrid, "本次读数") Then .TextMatrix(row, col) = .TextMatrix(row, FindCol(pubgrid, "上次读数"))
' If col = FindCol(pubgrid, "行度") Then .TextMatrix(row, col) = .TextMatrix(row, FindCol(pubgrid, "本次读数")) - .TextMatrix(row, FindCol(pubgrid, "上次读数"))
' End If
bcrow = FindCol(pubgrid, "本次读数")
Scrow = FindCol(pubgrid, "上次读数")
If col = bcrow Then
.TextMatrix(row, FindCol(pubgrid, "行度")) = (val(.TextMatrix(row, FindCol(pubgrid, "本次读数"))) - val(.TextMatrix(row, FindCol(pubgrid, "上次读数")))) * .Cell(flexcpValue, row, FindCol(pubgrid, "倍率"))
If .Cell(flexcpValue, row, FindCol(pubgrid, "行度")) < 0 Then .Cell(flexcpText, row, FindCol(pubgrid, "行度")) = .Cell(flexcpValue, row, FindCol(pubgrid, "行度")) + 10 ^ .Cell(flexcpValue, row, FindCol(pubgrid, "量程"))
End If
If col = Scrow Then
.TextMatrix(row, FindCol(pubgrid, "行度")) = (val(.TextMatrix(row, FindCol(pubgrid, "本次读数"))) - val(.TextMatrix(row, FindCol(pubgrid, "上次读数")))) * .Cell(flexcpValue, row, FindCol(pubgrid, "倍率"))
If .Cell(flexcpValue, row, FindCol(pubgrid, "行度")) < 0 Then .Cell(flexcpText, row, FindCol(pubgrid, "行度")) = .Cell(flexcpValue, row, FindCol(pubgrid, "行度")) + 10 ^ .Cell(flexcpValue, row, FindCol(pubgrid, "量程"))
End If

If col = FindCol(pubgrid, "倍率") Then
.TextMatrix(row, FindCol(pubgrid, "行度")) = (val(.TextMatrix(row, FindCol(pubgrid, "本次读数"))) - val(.TextMatrix(row, FindCol(pubgrid, "上次读数")))) * .Cell(flexcpValue, row, FindCol(pubgrid, "倍率"))
If .Cell(flexcpValue, row, FindCol(pubgrid, "行度")) < 0 Then .Cell(flexcpText, row, FindCol(pubgrid, "行度")) = .Cell(flexcpValue, row, FindCol(pubgrid, "行度")) + 10 ^ .Cell(flexcpValue, row, FindCol(pubgrid, "量程"))
End If
If col = FindCol(pubgrid, "行度") Then
.TextMatrix(row, FindCol(pubgrid, "本次读数")) = val(.TextMatrix(row, FindCol(pubgrid, "行度"))) / .Cell(flexcpValue, row, FindCol(pubgrid, "倍率")) + val(.TextMatrix(row, FindCol(pubgrid, "上次读数")))
End If

If Not IsNull(.TextMatrix(row, FindCol(pubgrid, "id"))) And Trim(.TextMatrix(row, FindCol(pubgrid, "id"))) <> "" Then
mycns.execute " update 公用表抄表 set 行度=" & .TextMatrix(row, FindCol(pubgrid, "行度")) & " , 倍率=" & .TextMatrix(row, FindCol(pubgrid, "倍率")) & ",本次读数=" & .TextMatrix(row, FindCol(pubgrid, "本次读数")) & ",上次读数=" & .TextMatrix(row, FindCol(pubgrid, "上次读数")) & " ,备注='" & .TextMatrix(row, FindCol(pubgrid, "备注")) & "'" & " where id=" & .TextMatrix(row, FindCol(pubgrid, "id"))
End If
If .ValueMatrix(row, bcrow) < .ValueMatrix(row, Scrow) Then
.Cell(flexcpBackColor, row, 0, row, .Cols - 1) = &HC0C0FF
Else
.Cell(flexcpBackColor, row, 0, row, .Cols - 1) = vbWhite
End If
'
End With
On Error GoTo 0
Exit Sub
doit:
MsgBox Err.Description, vbInformation + vbOKOnly, soft
End Sub

Private Sub pubGrid_BeforeEdit(ByVal row As Long, ByVal col As Long, Cancel As Boolean)
' If CboUnitPeriod.ListIndex = 0 Then
If col = FindCol(pubgrid, "本次读数") Or col = FindCol(pubgrid, "行度") Or col = FindCol(pubgrid, "上次读数") Or col = FindCol(pubgrid, "倍率") Or col = FindCol(pubgrid, "备注") Then
Cancel = False
Else
Cancel = True
End If
' Else
' Cancel = True
' End If
End Sub

Public Sub 打印(打印 As Boolean, billname As String)
On Error Resume Next
' Dim strwhere As String
kfxview11.connectstring = 连接串
kfxview11.用户名称 = 使用单位名称
kfxview11.操作员 = 当前操作员
Select Case billname
Case "用户抄表清单"
If 打印用户抄表清单 = False Then Exit Sub

kfxview11.billname = "用户抄表清单"
kfxview11.billtype = "1"
' kfxview11.strwhere = Mid(strUnitPeriod & strUnitMilter, 5)
kfxview11.strwhere = ""

Case "单元表抄表清单"
kfxview11.billname = "单元表抄表清单"
kfxview11.billtype = "1"
' kfxview11.strwhere = Mid(strUnitPeriod & strUnitMilter, 5)
kfxview11.strwhere = strwhere
kfxview11.strorderby = "单元编号,表名称"
Case "公用表抄表清单"
If MilterTab.Tab = 0 Then
MsgBox "请切换到公用表/总表视图!", vbInformation, soft
Exit Sub
End If
kfxview11.billname = "公用表抄表清单"
kfxview11.billtype = "1"
' kfxview11.strwhere = Mid(strPubPeriod & strPubMilter, 6)
kfxview11.strwhere = strwhere

End Select
If kfxview11.loaddata() Then
kfxview11.Play 打印
End If
End Sub


Private Function 打印用户抄表清单() As Boolean
On Error Resume Next
Dim dyntemp As New ADODB.Recordset, zhbh As String
Dim dynprint As New ADODB.Recordset, i As Integer
If unitgrid.Cell(flexcpText, unitgrid.row, FindCol(unitgrid, "住户名称")) = "" Then
MsgBox "本清单只打印某个住户的所有表,所以,请选择您想打印的住户!", vbInformation, soft
打印用户抄表清单 = False
Exit Function
End If

dyntemp.Open "select * from view单元表抄表 where 住户名称='" + unitgrid.Cell(flexcpText, unitgrid.row, FindCol(unitgrid, "住户名称")) + "' and 抄表终止日期='" + Trim(CboUnitPeriod.Text) + "'", mycns, adOpenDynamic, adLockOptimistic
mycns.execute "delete from 用户抄表清单"

If Not dyntemp.eof Then
zhbh = dyntemp!住户编号
dyntemp.Close
Set dyntemp = Nothing
dyntemp.Open "select * from view单元表抄表 where 住户编号='" + zhbh + "' and 抄表终止日期='" + Trim(CboUnitPeriod.Text) + "'", mycns, adOpenDynamic, adLockOptimistic
dynprint.Open "select * from 用户抄表清单 ", mycns, adOpenDynamic, adLockOptimistic

Do While Not dyntemp.eof
'MsgBox dynprint.Fields.Count
dynprint.AddNew
For i = 0 To dyntemp.Fields.Count - 1
dynprint.Fields(i) = dyntemp.Fields(i)
Next
dynprint.Update
dyntemp.MoveNext
Loop

dyntemp.Close: Set dyntemp = Nothing
dynprint.Close: Set dynprint = Nothing
dyntemp.Open "select count(*) as hs from view单元表抄表 where 住户编号='" + zhbh + "' and 抄表终止日期='" + Trim(CboUnitPeriod.Text) + "'", mycns, adOpenDynamic, adLockOptimistic
mycns.execute "update 单据类别 set 行数1=" + CStr(dyntemp!hs) + " where 单据名称='用户抄表清单'"
dyntemp.Close: Set dyntemp = Nothing
End If
打印用户抄表清单 = True
End Function

Private Sub unitgrid_DblClick()
unitgrid.SetFocus
End Sub

Private Sub unitgrid_KeyPressEdit(ByVal row As Long, ByVal col As Long, KeyAscii As Integer)
If KeyAscii = 13 And row <> unitgrid.Rows - 1 Then unitgrid.row = unitgrid.row + 1

End Sub

Private Sub 接收自动抄表读数_Click()
On Error Resume Next
Dim objrun As Object
Set objrun = CreateObject("西安抄表.CbclassM165")
objrun.抄表管理 mycns
Set objrun = Nothing


'frm接收自动抄表读数.Show 1
'If frm接收自动抄表读数.ok Then
'makewhere
'End If
End Sub

Private Sub 配表设置_Click()
On Error Resume Next
Dim obj As Object

If 权限("单元配表") Then
Set obj = CreateObject("西安抄表.CbclassM165")
' obj.西安抄表 mycns
' Case 7
obj.抄表管理 mycns
Set obj = Nothing
系统日志 "用户抄表", "进入配表设置"
End If
End Sub

Private Sub 西安抄表_Click()
On Error Resume Next
Dim obj As Object

If 权限("抄表接口") Then
Set obj = CreateObject("西安抄表.CbclassM165")
obj.西安抄表 mycns
Set obj = Nothing
系统日志 "用户抄表", "进入抄表"
End If

End Sub

Private Sub 总表读数表_Click()
Frm总表读数.Show
End Sub

搜索更多相关主题的帖子: Object False 财务 用户 
2007-10-18 18:15
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
收藏
得分:0 
发现个神奇的事情,难道函数名可以是中文??

从BFS(Breadth First Study)到DFS(Depth First Study)
2007-10-18 18:52
tianyu123
Rank: 1
等 级:新手上路
威 望:2
帖 子:576
专家分:0
注 册:2007-8-26
收藏
得分:0 

可以,但最好不要用中文,容易出错!

毕竟计算机是外国人发明的,要是中国人发明的就无所谓了!呵呵!

改变一切,须从改变观念开始!
2007-10-18 18:57
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
中文会产生编码问题是程序出错,最好不要用中文做变量或函数名。
2007-10-18 19:09
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
收藏
得分:0 
哦,我一直以为不能用中文,就没试过,不过用中文也没用英文方便的,还要一边编程一般换输入法,多麻烦

开始看还以为这个是伪代码

从BFS(Breadth First Study)到DFS(Depth First Study)
2007-10-18 19:14
永夜的极光
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2721
专家分:1
注 册:2007-10-9
收藏
得分:0 
这个帖子可以删掉了吧。。。没意义的标题,没意义的内容。。。

从BFS(Breadth First Study)到DFS(Depth First Study)
2007-10-18 19:14
zacom
Rank: 2
等 级:论坛游民
威 望:2
帖 子:381
专家分:15
注 册:2007-9-15
收藏
得分:0 

没有最好只有更好
2007-10-18 20:40
cainiao158
Rank: 1
等 级:新手上路
威 望:1
帖 子:157
专家分:0
注 册:2007-9-14
收藏
得分:0 
好长啊,他到底想干什么呢???

要想飞的更高,就把地平线忘掉!
2007-10-18 23:36
yeshirow
Rank: 4
等 级:贵宾
威 望:10
帖 子:854
专家分:0
注 册:2006-6-8
收藏
得分:0 
VBScript 的函數名不但可以是中文, 還可以是關鍵字(keywords) 或者 = (equal)號

原來朋友仔感情再天真, 亦是我永遠也會愛惜的人, 明日愛他人, 也記住學會不要緊; 原來朋友比戀人更高分, 亦讓我開始懂得不記恨, 若大家都敏感, 我更要永遠記得拒絕再因小事怪人, 爲何沒有這條校訓...Twins-朋友仔 MCSD Training
2007-10-19 07:28
快速回复:444
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019938 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved