如何解决;编译错误:类型不匹配“;在VB6中使用自己的ocx文件
我有一个名为GridEntry.ocx的ActiveX,我是从下载链接找到的 我想用它来做一个软件。 但我遇到了麻烦,收到了一条错误信息。“编译错误:类型不匹配” 我的代码 用这个如何解决;编译错误:类型不匹配“;在VB6中使用自己的ocx文件,vb6,activex,ocx,Vb6,Activex,Ocx,我有一个名为GridEntry.ocx的ActiveX,我是从下载链接找到的 我想用它来做一个软件。 但我遇到了麻烦,收到了一条错误信息。“编译错误:类型不匹配” 我的代码 用这个 Private Sub GridEntry1_KeyPress(KeyAscii As Integer, Row As Integer, Col As Byte) If KeyAscii = 13 Then Call GridEntry1.CellFocus(0, 1) With GridEntry1 .Ca
Private Sub GridEntry1_KeyPress(KeyAscii As Integer, Row As Integer, Col As Byte)
If KeyAscii = 13 Then
Call GridEntry1.CellFocus(0, 1)
With GridEntry1
.Caption = "TEST"
End With
End If
End Sub
您在哪一行看到错误?在这一行
Post=GridEntry1.CellFocus(0,1)
哇,太好了,您的解决方案运行良好。非常感谢你的帮助hi Volkan,谢谢你的回答。你能解释一下你的解决方案为什么有效吗?(什么是Post
与Call
?)
Private Sub GridEntry1_KeyPress(KeyAscii As Integer, Row As Integer, Col As Byte)
If KeyAscii = 13 Then
Call GridEntry1.CellFocus(0, 1)
With GridEntry1
.Caption = "TEST"
End With
End If
End Sub