Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
[E2007] My VBA turned into an AddIn doesn't see objects
Hi,
Just beginning programming Excel 2007 with VBA. My application works perfectly as long as it's embedded in my excel file. This one has "Microsoft Excel Objects" where you can see all the sheet pages and a "Modules" section where I have my VBA code. Now I wanted to be able to use my code on each of my Excel files. So I followed instructions to turn this into an AddIn and install it in Excel 2007 but the problem is that when launched, the code stops immediately telling me Runtime error 424 Object required Now, it's probably due to the fact that it doesn't see the actual file objects. I have the feeling it's limited to its own environment, own space. To create the Add In, I opened a new empty Excel file, added a Module, then added my VBA code. Named the project name: ReadTime. Saved as an AddIn. Installed the AddIn in Excel 2007 Of course, when I open a new Excel file and go to the VBA editor, I can see my worksheet objects, sheets 1 to 8. Then I see another Project, which has a Module1 with my code, what I expected to have. If I step into the code, any reference to the main Excel file objects leads to an error. The code executes correctly but doesn't see the objects (sheets 1 to 8). Of course those sheets 1 to 8 objects are not in my "ReadTime" project, only in the excel workbook itself. It's surely nothing complex, but I'm missing something to make my AddIn work in any Excel file. Thanks for any help on this. Sincerely, Steve JORDI (Remove the K_I_L_LSPAM from my email address) ------------------------------------------------ 1197 Prangins Email: Switzerland WWW: www.sjordi.com ------------------------------------------------ Volcanoes at www.sjordi.com/volcanoes MovieDB at www.sjmoviedb.com ------------------------------------------------ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
[E2007] My VBA turned into an AddIn doesn't see objects
Hi,
I think you will need to post your code to get help on this but it could be as simple as the way you are referring to objects For example instead of Sheets("Sheet8").Range... use activeworkbook.Sheets("Sheet8").Range.. Mike "Steve JORDI" wrote: Hi, Just beginning programming Excel 2007 with VBA. My application works perfectly as long as it's embedded in my excel file. This one has "Microsoft Excel Objects" where you can see all the sheet pages and a "Modules" section where I have my VBA code. Now I wanted to be able to use my code on each of my Excel files. So I followed instructions to turn this into an AddIn and install it in Excel 2007 but the problem is that when launched, the code stops immediately telling me Runtime error 424 Object required Now, it's probably due to the fact that it doesn't see the actual file objects. I have the feeling it's limited to its own environment, own space. To create the Add In, I opened a new empty Excel file, added a Module, then added my VBA code. Named the project name: ReadTime. Saved as an AddIn. Installed the AddIn in Excel 2007 Of course, when I open a new Excel file and go to the VBA editor, I can see my worksheet objects, sheets 1 to 8. Then I see another Project, which has a Module1 with my code, what I expected to have. If I step into the code, any reference to the main Excel file objects leads to an error. The code executes correctly but doesn't see the objects (sheets 1 to 8). Of course those sheets 1 to 8 objects are not in my "ReadTime" project, only in the excel workbook itself. It's surely nothing complex, but I'm missing something to make my AddIn work in any Excel file. Thanks for any help on this. Sincerely, Steve JORDI (Remove the K_I_L_LSPAM from my email address) ------------------------------------------------ 1197 Prangins Email: Switzerland WWW: www.sjordi.com ------------------------------------------------ Volcanoes at www.sjordi.com/volcanoes MovieDB at www.sjmoviedb.com ------------------------------------------------ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
[E2007] My VBA turned into an AddIn doesn't see objects
Mike,
thanks for your prompt reply... Just added the recommandation and it seems to work :-) Ok good, I'll continue going ahead now. I love forums! What a resource for developers! Again, thanks a lot. Sincerely, Steve JORDI (Remove the K_I_L_LSPAM from my email address) ------------------------------------------------ 1197 Prangins Email: Switzerland WWW: www.sjordi.com ------------------------------------------------ Volcanoes at www.sjordi.com/volcanoes MovieDB at www.sjmoviedb.com ------------------------------------------------ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calender in E2007 | Excel Programming | |||
E2007 - Macro for splitting text and then replacing something | Excel Discussion (Misc queries) | |||
I am using excel 2002 with the business objects addin for Infoview | New Users to Excel | |||
Automation AddIn (UDF) in C# not able to manipulate XL Objects... | Excel Programming | |||
COM Addin for Excel: Despite referencing the Excel Object Library no objects availabl | Excel Programming |