View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Using common VBA code for a series of Woorkbooks.

It is hard to say Martin without knowing what the code does, and how it is
invoked. For instance, if you have menus, there is very little change, just
make sure that you direct the code at the correct workbook (i.e. not
ThisWorkbook, which is the add-in). If you are invoking the add-in code from
the other workbooks, you need to look at using Application.Run

Application.Run "'my add-in.xla'!myMacro"

You may also want to look at application events (do a google), which creates
events that can work on any workbook.worksheet.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Martin Sørensen" wrote in message
oups.com...

Bob Phillips skrev:

Create an add-in


http://support.microsoft.com/default.aspx?kbid=211563
How to create an add-in file in Excel 2000

http://support.microsoft.com/default.aspx?kbid=156942
XL97: How to Create an Add-in File in Microsoft Excel 97

Thanks, that looks promising. I have followed the instructions, now I
have to change the existing workbooks to use the add-in. Any tips?

BTW, we are using Excel 2003, some may still be on Excel 2000.

best regards

Martin