各位高手:帮我看看以下这段代码:(我在自己的机器上调试运行,打包后安装运行都没问题,可是找一台空机器安装后执行就出现:“ActiveX部件不能创建对象。”的错误,而且还把我App.Path & "\Data\"下的几个莫版文件删除了,我用的InstallShield.Express.v5.0.SP2打的包,用vb子带打包工具错误也一样,Miscrosoft Scripting RunTime引用也加了)Public Function SaveData() As Boolean
Dim sqlstr As String
Dim fs
TableFileMZMAIN = "MZMAIN"
TableFileMZSUB = "MZSUB"
TableFileZYMAIN = "ZYMAIN"
TableFileZYSUB = "ZYSUB"
S_FileName = App.Path & "\Data\"
On Error GoTo Err_2
If FileExists(S_FileName & TableFileMZMAIN & ".DBF") Then Kill (S_FileName & TableFileMZMAIN & ".DBF")
If FileExists(S_FileName & TableFileMZSUB & ".DBF") Then Kill (S_FileName & TableFileMZSUB & ".DBF")
If FileExists(S_FileName & TableFileZYMAIN & ".DBF") Then Kill (S_FileName & TableFileZYMAIN & ".DBF")
If FileExists(S_FileName & TableFileZYSUB & ".DBF") Then Kill (S_FileName & TableFileZYSUB & ".DBF")l1:
Screen.MousePointer = vbHourglass
If CopyData Then
MsgBox "导数据成功!", vbInformation
Else
MsgBox "导数据失败!", vbCritical
End If
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists(S_FileName & TableFileMZMAIN & ".DBF") Then
fs.CopyFile (S_FileName & TableFileMZMAIN & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "MZMAIN.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
If fs.FileExists(S_FileName & TableFileMZSUB & ".DBF") Then
fs.CopyFile (S_FileName & TableFileMZSUB & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "MZSUB.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
If fs.FileExists(S_FileName & TableFileZYMAIN & ".DBF") Then
fs.CopyFile (S_FileName & TableFileZYMAIN & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "ZYMAIN.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
If fs.FileExists(S_FileName & TableFileZYSUB & ".DBF") Then
fs.CopyFile (S_FileName & TableFileZYSUB & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "ZYSUB.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
Screen.MousePointer = vbDefault
SaveData = True
Exit Function
Err_1:
MsgBox "访问数据库失败!", vbCritical
SaveData = False
Exit Function
Err_2:
MsgBox "访问文件失败!" & Err.Description, vbCritical
SaveData = False
End Function
Dim sqlstr As String
Dim fs
TableFileMZMAIN = "MZMAIN"
TableFileMZSUB = "MZSUB"
TableFileZYMAIN = "ZYMAIN"
TableFileZYSUB = "ZYSUB"
S_FileName = App.Path & "\Data\"
On Error GoTo Err_2
If FileExists(S_FileName & TableFileMZMAIN & ".DBF") Then Kill (S_FileName & TableFileMZMAIN & ".DBF")
If FileExists(S_FileName & TableFileMZSUB & ".DBF") Then Kill (S_FileName & TableFileMZSUB & ".DBF")
If FileExists(S_FileName & TableFileZYMAIN & ".DBF") Then Kill (S_FileName & TableFileZYMAIN & ".DBF")
If FileExists(S_FileName & TableFileZYSUB & ".DBF") Then Kill (S_FileName & TableFileZYSUB & ".DBF")l1:
Screen.MousePointer = vbHourglass
If CopyData Then
MsgBox "导数据成功!", vbInformation
Else
MsgBox "导数据失败!", vbCritical
End If
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists(S_FileName & TableFileMZMAIN & ".DBF") Then
fs.CopyFile (S_FileName & TableFileMZMAIN & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "MZMAIN.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
If fs.FileExists(S_FileName & TableFileMZSUB & ".DBF") Then
fs.CopyFile (S_FileName & TableFileMZSUB & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "MZSUB.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
If fs.FileExists(S_FileName & TableFileZYMAIN & ".DBF") Then
fs.CopyFile (S_FileName & TableFileZYMAIN & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "ZYMAIN.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
If fs.FileExists(S_FileName & TableFileZYSUB & ".DBF") Then
fs.CopyFile (S_FileName & TableFileZYSUB & ".DBF"), sFile & HospID & "_" & Left(DateNoStr, 6) & "_" & "ZYSUB.DBF"
Else
MsgBox "报盘模版丢失!", vbInformation + vbCritical
End If
Screen.MousePointer = vbDefault
SaveData = True
Exit Function
Err_1:
MsgBox "访问数据库失败!", vbCritical
SaveData = False
Exit Function
Err_2:
MsgBox "访问文件失败!" & Err.Description, vbCritical
SaveData = False
End Function
rainstormmaster(暴风雨 v2.0) 怎么看,能说详细点么?