Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default [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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default [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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default [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
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
Calender in E2007 Michael Rühling Excel Programming 2 December 25th 09 02:04 AM
E2007 - Macro for splitting text and then replacing something Niniel Excel Discussion (Misc queries) 2 November 18th 09 10:11 AM
I am using excel 2002 with the business objects addin for Infoview Sarah H Pearson[_2_] New Users to Excel 0 October 27th 09 05:04 PM
Automation AddIn (UDF) in C# not able to manipulate XL Objects... pdxJaxon Excel Programming 3 July 16th 08 05:10 AM
COM Addin for Excel: Despite referencing the Excel Object Library no objects availabl Newmoon Excel Programming 0 August 30th 05 03:58 PM


All times are GMT +1. The time now is 11:52 PM.

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"