?
Solved

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

Posted on 2011-09-08
6
Medium Priority
?
427 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

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 (Microsoft MVP / EE MVE) earned 1600 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 400 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
Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
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
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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

764 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