enddie onskynet
enddie onskynet

Reputation: 58

HOW to solve "Compile error: Type mismatch" with own file ocx in VB6

I have an ActiveX named GridEntry.ocx I found it from the download link GridEntry.ocx

I want to use it to make a software. but I'm having trouble, and getting an error message. "Compile error: Type mismatch" my code

Private Sub GridEntry1_KeyPress(KeyAscii As Integer, Row As Integer, Col As Byte)
If KeyAscii = 13 Then
Post = GridEntry1.CellFocus(0, 1)
 With GridEntry1
  .Caption = "TEST"
  End With
End If
End Sub

Upvotes: 0

Views: 130

Answers (1)

Volkan ŞABAHAT
Volkan ŞABAHAT

Reputation: 26

Use this

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

Upvotes: 1

Related Questions