Accessing the active workbook object

M

Michael

I'm in the process of creating a managed office add-in using vb.net and Excel
2000. I'm using the Shared Add-in project from Vs.net to create the shell.The
add-in creates the button that lauches my .net form, however would i like to
read all of the worksheets in the excel workbook that the person open. When
you create the add-in project it has some variables like the
applicationobject. I thought that this object would hold the current workbook
information so i can access the current workbook sheets. What's happening is
that i'm getting a Exception from HRESULT: 0x800A03EC when accessing the
objects(applicationobject.ThisWorkbook.Sheets.Item(1). What am i doing wrong,
i just want to access the workbook object that was lauched when they click
the menu button in excel. Any ideas will be helpful


thanks
 

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