The event procedure in this example displays the range formula in the language that the user is working in whenever the user double-clicks in the spreadsheet. Note that this procedure is declared as required by Visual Basic. For more information about using event procedures, see Declaring and Using Event Procedures.
Private Sub Spreadsheet1_DblClick(ByVal EventInfo As OWCCtl.SpreadsheetEventInfo)
MsgBox EventInfo.Range.FormulaLocal
End Sub