Solved

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

Posted on 2011-09-08
6
380 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:
Ingeborg Hawighorst 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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:Ingeborg Hawighorst
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

813 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

10 Experts available now in Live!

Get 1:1 Help Now