View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Creating add-ins from Excel 4 macros

You said you had a workbook that you wanted to make an addin.

I said go to the vbe in that workbook and change the isaddin property of the
thisworkbook object properties to true. Then save the workbook so it has an
xla property and is of type addin.

I don't see anywhere that those instructions involve VBA and certainly
nothing that involves executing the macro command you have been bantying
about. ( although doing the save may be easiest to do in the immediate window
using a VBA command. )

Assume the file you want to save as an addin in named Myaddin.xls, then in
the immediate window:

Workbooks("MyAddin.xls").SaveAs "C:\MyFolder\MyAddin.xla", Fileformat:=xlAddin
Workbooks("MyAddin.xla").Close SaveChanges:=False

here is a reference which might have some additional useful information on
addins in general

http://www.jkp-ads.com/Articles/DistributeMacro00.htm

--
Regards,
Tom Ogilvy


"Graham" wrote:

Hello. Thank you for replying.
To clarify - the macro that we want to save as an add-in is purely an Excel
4 macro. There is no VBA involved in it at all. The only VBA we have tried
is a single line of code adapted from http://support.microsoft.com/kb/q114436
which we thought might enable us to use the Excel 4 macro function
"=VBA.MAKE.ADDIN(filename_text)". (VBA.MAKE.ADDIN appears to have been
disabled in our version of Excel - I suspect this may have something to do
with virus protection measures). But this line of VBA code did not work.
Your suggestion, if I have understood it correctly, is to save the VBA module
continuing this code as an add-in. I can't see how saving a bit of code that
doesn't work as an add-in is going to help anything. Maybe I have
misunderstood you, or maybe there is some important principle here I haven't
grasped? Please explain. Thank you very much for your time.
Best wishes,
Graham