[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

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

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
New_Alex
Asked:
New_Alex
2 Solutions
 
Raheman M. AbdulCommented:
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
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
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
 
andrewssd3Commented:
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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
New_AlexAuthor Commented:
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
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
It's very close to the end of the list. Scroll down, then down a bit more.


shot.png
0
 
New_AlexAuthor Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now