Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OLEObject question Bragadiru Excel Programming 0 March 15th 05 04:17 PM
FollowHyperlink to OLEObject Tony Excel Programming 0 January 5th 05 10:15 PM
de-activating OLEObject greg Excel Programming 5 December 3rd 04 09:38 PM
Get OLEObject with CSharp Bragadiru Excel Programming 0 November 2nd 04 03:31 PM
OLEobject on the sheet Ryan[_6_] Excel Programming 1 August 3rd 03 03:15 PM


All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"