Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-09-08
6
Medium Priority
?
435 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
New style of hardware planning for Microsoft Exchange server.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

610 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