Solved

VBA, .xltm as an add-in gives errors.

Posted on 2011-09-08
6
358 Views
Last Modified: 2012-05-12
My Excel 2007 .xltm Macro Enabled Code runs fine as long as it does not open from the following foloder:

C:\Users\User\AppData\Roaming\Microsoft\Excel\XLSTART

Open in new window


The error I get is this:
You can't run this program because some of its components are missing 

Open in new window


On the other hand if I attempt to Add my template as an Excel Add-In from the Excel Options it gives me this error:

C:\Users\User\AppData\Roaming\Microsoft\Excel\XLSTART\myaddin.xltm is not a valid add-in

Open in new window


Even when using a different folder, it gives me the same error:
C:\myaddin.xltm is not a valid add-in

Open in new window


Any ideas as to how Excel can display a working shortcut to my VBA as an add-in every time I start excel?

Thanks
 
0
Comment
Question by:New_Alex
6 Comments
 
LVL 18

Expert Comment

by:Raheman M. Abdul
ID: 36501660
Firtst Try to deactivate the Outlook Sync add-in and restart Outlook and test

Secondly, find and rename the extend.dat file to  say extend.old or whatever

Follow : http://support.microsoft.com/kb/235009
0
 
LVL 50

Accepted Solution

by:
teylyn earned 400 total points
ID: 36501703
Hello,

Save the xltm as an Excel Add-in with the xlam extension. Then install the add-in.

I don't think any xlsm can be used like an add-in. You need the xlam format for that.

cheers, teylyn
0
 
LVL 17

Assisted Solution

by:andrewssd3
andrewssd3 earned 100 total points
ID: 36501855
That's right - it works from the XLSTART location because Excel opens all files in that location automatically when it starts, so your template is being opened as a new document and your code is available.  But an add-in is a special sort of file and does not expose its worksheets in the GUI.
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:New_Alex
ID: 36508334
I can not find the option to save as an Excel Add-in with the xlam extension,
even if I go to /Save As /Other Formats

Any ideas?

Thanks
0
 
LVL 50

Expert Comment

by:teylyn
ID: 36509218
It's very close to the end of the list. Scroll down, then down a bit more.


shot.png
0
 
LVL 1

Author Comment

by:New_Alex
ID: 36510975
Hi teylyn and others and thanks to all

The problem was that I had different than SheetX named worksheets in the file. After i deleted them the xlam option appeared.

Ok some points given
Thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now