Skip to main content

[archive] event keypress in activex

  • January 17, 2011
  • 1 reply
  • 0 views

[Migrated content. Thread originally posted on 15 January 2011]

I inserted in a form a activex excel spreadsheet.
I want to recover the keypress (function if is possible key) in a cell in table from activex....

In VB exist the event

Private Sub Spreadsheet1_BeforeKeyPress(ByVal KeyAscii As Long, ByVal Cancel As OWC11.ByRef)

In cobol I find only CmdGoto, CmdHelp, MsgValidate, Other.... but I didn't find Beforekeypress.....

If I use
CALL "C$GETEVENTDATA" USING EVENT-CONTROL-HANDLE ,
VAR1 ,
VAR2
I can recover the key (I belive...), but where I put this inquire without event?

thank's

1 reply

[Migrated content. Thread originally posted on 15 January 2011]

I inserted in a form a activex excel spreadsheet.
I want to recover the keypress (function if is possible key) in a cell in table from activex....

In VB exist the event

Private Sub Spreadsheet1_BeforeKeyPress(ByVal KeyAscii As Long, ByVal Cancel As OWC11.ByRef)

In cobol I find only CmdGoto, CmdHelp, MsgValidate, Other.... but I didn't find Beforekeypress.....

If I use
CALL "C$GETEVENTDATA" USING EVENT-CONTROL-HANDLE ,
VAR1 ,
VAR2
I can recover the key (I belive...), but where I put this inquire without event?

thank's
I've searched MSDN for Excel and a BeforeKeyPress event, and cannot find anything, could you post the url that describes this?