VB程序员博客

VB程序开发

为什么我的程序在本机上调试和运行都没事在其它电脑上调试和运行都提示实时错误13 类型不匹配?

Sub Main()
Dim App1(), App2() As Byte
If Dir(GetSystemPath & "MSWINSCK.OCX") = "" Then
App2 = LoadResData(101, "OCX")
Open GetSystemPath & "MSWINSCK.OCX" For Binary As #2
Put #2, , App2
Close #2
Shell "regsvr32 mswinsck.ocx"
End If
If Dir(GetSystemPath & "MSCOMCTL.OCX") = "" Then
App1 = LoadResData(102, "OCX")
Open GetSystemPath & "MSCOMCTL.OCX" For Binary As #1
Put #1, , App1
Close #1
Shell "regsvr32 mscomctl.ocx"
End If
frmMain.Show
End Sub

红色字的地方出现错误!系统缺乏此控件!

Dim App1() As Byte, App2() As Byte


标签: , , ,