PDA

View Full Version : Solved: ADD INS ---- FAQ[s] to be Answered



asingh
09-18-2006, 03:00 AM
Hi,

I have the following questions about add ins. If some one could guide me to a comprehensive article..or answer them here..it would be great...!

1. When an add in is being 'coded'. Where should the code be placed. In a separate module in the workbook, or in a Workbook Event. [If yes, which event]....?

2. Once the add in has been saved as .XLA type...how is it added so, each time I launch Excel it is available.....?

3. How do I fire the add in....? i.e get it to execute....?

4. If I save a file, with an add in embedded all ready in my excel, and I mail it to someone, will they need to install the add in. Or will they receive the file with the add in pre-installed..? Or will their sheet throw up an error...?

thanks a lot.....

regards,

asingh

Bob Phillips
09-18-2006, 04:20 AM
1. When an add in is being 'coded'. Where should the code be placed. In a separate module in the workbook, or in a Workbook Event. [If yes, which event]....?


That depends upon what the code is to do. The same decisions as you would use with a normal workbook apply.


2. Once the add in has been saved as .XLA type...how is it added so, each time I launch Excel it is available.....?

Tools>Addins browse for the file, and check it in the addins list.


3. How do I fire the add in....? i.e get it to execute....?

The usual way is to add a menu or toolbar when the addin starts, or else you can just pick the macros from the macro list. You can also have UDFs in your addin which can be used from any worksheet.


4. If I save a file, with an add in embedded all ready in my excel, and I mail it to someone, will they need to install the add in. Or will they receive the file with the add in pre-installed..? Or will their sheet throw up an error...?

Nope, they need to install it themselves, it is a separate component.

Before I answer anymore, can you confirm that this is not homework, or coursework?

asingh
09-18-2006, 07:13 PM
My utmost guarantee..and honesty : NO This is not homework or coursework [I wish I was a student though......!]. I am a working professional...and Excel is used extensively where I work. I plan to create a couple of add - ins, cause there are multiple tasks which we repeat on a daily basis...for example
1. Changing fonts...
2. Change Column Widths/Heights..
3. Hiding/Unhiding unused area....

thanks...
asingh

Bob Phillips
09-19-2006, 01:12 AM
Don't we all :)

So did my answers help? Do you need any more?

asingh
09-19-2006, 02:05 AM
One last one...How do i get the Macro to fire...?

Bob Phillips
09-19-2006, 03:42 AM
Which macro?

If you mean (any) one in the addin, as I said before, you can either create a UDF which is accessible from a worksheet like any other function, call it from the macro list, or create a menu or toolb ar with buttons that invoke the macro(s).