View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Add In or a Macro?

An Addin is just a workbook that's been saved as an addin (under the Save As
Type box in the File|SaveAs dialog).

Usually an addin will have macros--but so can just plain old workbooks.

One of the nice things about an addin is that you can refer to the functions
just like the functions are built into excel.

With workbooks, you'd probably see:
=myworkbook.xls!myfunctionName(a1)
instead of just:
=myfunctionname(a1)

You can put the functions in the workbook that uses it, but if you have lots of
workbooks that use them, then a single addin would make more sense -- only one
file to update when something changes.

If you can put your addin on a network drive that all the users have access to,
then you can tell the users to use:
tools|addins (and browse for it)
to install your addin.

This is nice since there's only one file that contains the code.

If you can't do this--not all users always have access to that network drive,
you can save your file as an addin and email it to the user.

To make life easier, tell them to store the file in the same location on their
C:\ drive -- like a folder named: C:\FarazAddins

Then tell them to use
tools|addins to browse to that location and install it.

One of the bad things about addins is that the macros (subs, not functions)
aren't visible to the user via Tools|Macro|macros...

If you have subs that you want your users to be able to run, then you'll want to
give them a way to access those routines.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

FARAZ QURESHI wrote:

What is the main difference between in an Add-in and a Macro?

Can a general macro be implemeted via Add-In, e.g. one for disallowing
pasting of data on any of the opening workbooks?


--

Dave Peterson