Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

KeyPress or KeyDown event on MS Office SS 11.0

Hello,

I am currently having issues with a keypress or keydown event on a MS Office Spreadsheet 11.0 that I've added to my Windows Form. I would like to navigate to a particular webpage in my web browser (also located on the form) from a particular cell when I type a key. At this point nothing happens and the regular key function takes place. I am working with VB.Net 03. Any assistance would be greatly appreciated. Thank you. Here's the code I am using:

Private Sub eBSS1_KeyPressEvent(ByVal sender As Object, ByVal e As_ AxMicrosoft.Office.Interop.Owc11.ISpreadsheetEventSink_KeyPressEvent)_ Handles eBSS1.KeyPressEvent
If e.keyAscii = Keys.F2 Then
WebBrowser.Navigate(eBSS1.ActiveCell.Text)
End If
End Sub
[796 byte] By [boomstick425] at [2007-11-11 7:45:49]