发表于:2005-11-09 15:51:00
3楼
不知道哪个地方出问题,度不出数据:
Dim DatObj As Object
Private Sub Form_Load()
On Error Resume Next
Set DatObj = GetObject(, "McgsRun.DataCentre")
If Err Then
MsgBox ("请先启动MCGS运行环境!")
End
End If
End Sub
Private Sub Cmd_Read_Click()
Dim msg As String, tt As Variant
For i = 1 To 10
msg = "Dat" + Format$(i, "00")
DatObj.GetValueFormName msg, tt
Txt(i) = Format$(tt)
Next i
End Sub