我已将整个 vb6 代码从一台机器复制到另一台机器,现在当我在另一台机器上运行我的代码时,它显示如下错误:编译错误:过程声明与具有相同名称的事件或过程的描述不匹配,这是代码 :
Private Sub MKDataGrid1_KeyPress()
If MKDataGrid1.Col = 0 Or MKDataGrid1.Col = 1 Or MKDataGrid1.Col = 2 Or MKDataGrid1.Col = 3 Then
MKDataGrid1.AllowUpdate = False
MsgBox "This field is not to edit. Thnks"
MKDataGrid1.AllowUpdate = False
cmdAdd.visible = True
cmdAdd.SetFocus
cmdAdd.visible = False
Else
MKDataGrid1.AllowUpdate = True
End If
End Sub