Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problems creating a dll in Excel 2003 using addin designer
I have an Excel addin which I need to distribute so have created a com
addin using the addin designer. After much searching in Groups I have it at the stage where it creates the buttons it needs to when Excel is opened. I've copied the forms, modules and class modules from my xla file into the addin but am having trouble getting the code to work when it's called by the relevant button. (ie I have code that will only run if a workbook is open. When I run it in Excel with a workbook open it returns 0 as the workbook count.) I think it's because when the code runs it's creating a new instance of excel.exe and referring to that rather than the current instance. When I check in task manager when I first open Excel there's one Excel.exe yet when I run this macro there's two. I copied some of the code into VB6 so I could debug it and found that if I added the getobject line (ie Set objXL = GetObject (, "Excel.Application") it worked. Trouble is when I copy that code into the addin project in Excel I get the "ActiveX Component cannot create object" message. The project references Excel so I don't know why I'm getting that message. Any suggestions would be really appreciated!! The other problem I have which may be caused by the same thing is that when I calls the dialogs(wddialogsfileopen).show line, it doesn't appear until I've closed Excel! Again - any suggestions greatly appreciated. Tammy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
addin for analysis tool pak for excel 2003 | Excel Discussion (Misc queries) | |||
addin for analysis tool pak for excel 2003 | Excel Worksheet Functions | |||
addin problems | Excel Programming | |||
Creating a new Excel Addin | Excel Programming | |||
Problems with Excel Com Addin | Excel Programming |