PDA

View Full Version : Create Excel add-in



dan1976
11-30-2005, 06:49 PM
help!

it doesn't work???

it can create a new file named *.xla, but you cann't add it in.

when i tried to add it in, it shows that it is NOT a valid add-in.
what's the reason and how can I solve it? (i am using Excel 2003)

Thanks,

Dan

Zack Barresse
12-04-2005, 03:42 PM
Hello Dan,

I have moved your post to your own thread. That is called thread hijacking. No biggie though. ;)

As for your question, please provide us with the exact steps you have taken. Some things which may affect you:

The file should be saved as an add-in from File | SaveAs
The add-in file should be placed in an easy-to-find directory (i.e. C:\WINDOWS\ADDINS)
Install the add-in by Tools | Addins | Browse | choose | Ok

tpoynton
12-05-2005, 05:39 AM
Dont forget to set the "IsAddin" property of ThisWorkbook (in the VB Editor) to true - you will get that error if you dont change that property.

Zack Barresse
12-05-2005, 09:36 AM
True, but if you use the SaveAs method you do not need to set any property as it's done for you already in the file format of the save.

tpoynton
12-05-2005, 11:01 AM
Indeed - I stand corrected. The only time i have seen that error when a file has a .xla extension is when the property is set to false. It happens to me with embarrasing frequency...The difference here is that i manually change it to false to access the worksheets; I then save and forget to change the property, and get "the error".

Zack Barresse
12-05-2005, 11:15 AM
To combat that, you could always put something in your Workbook_BeforeSave event in your ThisWorkbook module of your add-in, thus preventing anything like that from happening.

tpoynton
12-05-2005, 11:39 AM
THANKS - I knew the property existed (ThisWorkbook.IsAddin = True), kinda knew the event existed, but never thought to put them together! Now if we only knew if this solved Dan1976's problem...