2007 managed code shared addins using C#

G

Guest

When I run the example from MSDN title 'Creating managed addins for Access
2007' using the C# version the process errors out after reading the
HookupControls procedure in the managed code and returning to Access control.
The error message suggests that there is no instance of the object. I tried
creating the object, but then the call to the add in malfunctions. I haven't
been able to find definitive information or other examples about this new
procedure.

The startup on the add in side is working ok (I"ve used breakpoints and
stepped through the code). The problem occurs when program control returns
from the addin. I can only conclude that something was left out on the
example, or, that they didn't really ever run it using C#. Can anyone tell
me what needs to be done to make this work?

Using Office 2007 beta, Visual Studio 2005 and Windows XP service pak 2

Thank you in advance.
 
B

Brendan Reynolds

Thanks. I'll take a look and post back here to let you know if I find
anything useful.
 
B

Brendan Reynolds

There appear to be two lines missing from the published code ...

productsListBox = listBox; // this line was missing
productsListBox.DispListBoxEvents_Event_AfterUpdate +=
new Microsoft.Office.Interop.Access.
DispListBoxEvents_AfterUpdateEventHandler(
productsListBox_AfterUpdate);
productsListBox.AfterUpdate = "[Event Procedure]"; // this line
was missing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top