Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
OLEObject.GotFocus
I am trying to add a GotFocus Handler to OLEObject in excel and it will
always trip and exception. The following code snippet show how I'm handling the event. It blows at the += Excel._Application ExcelApp = (Excel._Application)applicationObject; Excel.Worksheet activeWorksheet = (Excel.Worksheet)ExcelApp.ActiveSheet; Excel.OLEObjects objCollection = (Excel.OLEObjects)activeWorksheet.OLEObjects(Type. Missing); Excel.OLEObjectEvents_GotFocusEventHandler hand = new Excel.OLEObjectEvents_GotFocusEventHandler(objOle_ GotFocus); Excel.OLEObject objBarcode = objCollection.Add("Barcodefactory.Barcode", null, null, null, null, null, null, curSel.Left, curSel.Top, curSel.Width, curSel.Height); objBarcode.GotFocus += hand; Thanks, Will Morgan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OLEObject question | Excel Programming | |||
FollowHyperlink to OLEObject | Excel Programming | |||
de-activating OLEObject | Excel Programming | |||
Get OLEObject with CSharp | Excel Programming | |||
OLEobject on the sheet | Excel Programming |