Missing: Microsoft PowerPoint 16.0 Object Library (Excel VBA) - excel

I've written a piece of kit on Excel 2016 that uses a combination of formula and vba macros.
Basically some of the people that will be using this may be using an older version of Excel (2013 or 2010). When testing out whether the file will run on 2013 the Microsoft Powerpoint 16.0 library was missing and some of the code would not run.
The only fix was to add the Microsoft PowerPoint 15.0 library and then it seemed to work.
Is there any way to add the libraries automatically when I send this file to other people, or add the 15.0, 14.0 and 13.0 library's in my copy so that this is not an issue for other users?
[EDIT] From further reading it appears that older versions of excel use different libraries and it doesn't look like you can "pick and choose" whether to use 16.0, 15.0 etc. (Please correct me if I'm wrong). Apparently there is something called "Early/Late Binding" which might help me out, I assume this is referencing within my actual VBA code so if that is a viable solution any more information would be appreciated.

You have two options.
Develop on the lowest common denominating Office version (references will automatically "upgrade" on newer versions)
Change your code from early binding (using a reference to the library) to late binding (using generic Object declarations for everything related to PPT, replacing all PPT constants with their associated values). You then get a reference to Powerpoint using the CreatObject or GetObject function.

Related

Excel is missing certain functions

Just now i realized that my Excel Version is missing some functions, e.g. =UNIQUE() or =XLOOKUP(). Also in the tab with the list of all functions these are not available. Other functions work fine though. Is there a way to install these functions manually?
I am using: Microsoft® Excel® 2016 MSO (Version 2112 Build 16.0.14729.20156) 64 Bit
I just tried to update, but it is already up-to-date.
[Sidenote: I am using the German Version, so I am actually missing the functions =EINDEUTIG() and =XVERWEIS() but either or - these functions are missing in my Excel]
Unless you're using Microsoft Office 365 compatible version of Excel, your only other chance might be to sign up with Office Insider, which gives you access to exclusive new content / features as a trial user (whilst unique, filter, let, sort, sortby etc. functionality has been out for some time, there may well be dependencies on this RE: new content). Thanks to Insider I had access to unique functionality long before the Office 365 build was officially launched (about a year before if I remember correctly).
You can do both this and see what version Excel you are on by opening Excel and selecting File -> Account:

Microsoft MS Project XX.X Object Library Reference Missing from References List in VBA

Ultimately I want to build a MS Project file using early binding from VBA behind XLS or MPP.
In order to do that, it is my understanding that you should go to Tools--> References and select the Microsoft Project XX.X Object Library.
Unfortunately, it wasn't in the list.
The References pop-up allows you to browse, and select the reference library manually. Great! But, where do I look, and what file do I select to import this reference?
Assuming you are looking in Excel VBA References's list, it should just show up. Here's mine:
Note that I see it as Microsoft Office Project XX.X Object Library, you asked about Microsoft Project XX.X Object Library (lacking Office).
My environment is Win10; both Excel 2016 32-bit and Project 2016 32-bit are installed.
Perhaps try re-installing your Office components? Perhaps try making sure you have both the same bit architecture (32 or 64).

SAP Business Objects Financial Consolidation Excel Add-In Automation

I have a SAP Business Objects Web 7.5 Add-in in Excel 2007.
The add in itself is made up of a compiled .xll file (CtExcelLinksWeb.xll) and a number of dll's.
A bit of vba shows the xll is registered, and all of its registered functions.
However, when I try to use one of these functions in VBA using Application.Run(), I get
Runtime 1004 - Macro may not be available or may be disabled.
I have tried registering the xll within the same sub (Application.RegisterXLL ()) and upon registering a VBAProject called CtEmpty.csv is created
I want to be able to automate the use of this add-in using VBA as it does long winded repetitive tasks, and then I can work on figuring out how to use the functions
Any help will be appreciated
Are the DLLs on the PATH? It may be that Excel can't load the DLLs that the XLL is dependent upon. Dependency Walker (depends.exe) is a handy tool for troubleshooting this kind of issue.
Also, have you tried using File/Options/Addins to register the XLL, as well as VBA code?

Protect VBA code for Excel

Besides adding a password under Project Properties > Protection (Which I think is actually quite easy to hack), how can I prevent users from viewing / copying my code?
May be this is the good possibility: http://msdn.microsoft.com/en-us/library/office/aa189867(v=office.10).aspx
To provide the highest level of security for your VBA code, use
Microsoft Visual Basic version 6.0 to create a Component Object Model
(COM) add-in. Because the VBA code in a COM add-in is compiled as a
dynamic-link library (DLL), it can't be modified without access to the
source code used to originally create it. Application-specific add-ins
are not compiled; you must use the same protections as templates and
documents.

Declaring early bound MSXML object throws an error in VBA

I am trying to import xml data into excel..
So the first line of the code is
Dim XMLDOC As MSXML2.DOMDocument
and this gives an error "user defined type not defined"
Inside the VBE, Go to Tools -> References, then Select Microsoft XML, v6.0 (or whatever your latest is. This will give you access to the XML Object Library.
Updated with fancy pic!
I had DOMDocument defined which needed Microsoft XML, v3.0 but I had Microsoft XML, v6.0 selected in references which caused the below error
"user defined type not defined".
The solution
The solution was to either change DOMDocument to DOMDocument60 (60 uses ver 6.0) or use the Microsoft XML, v3.0 reference with DomDocument.
Just a quick note, if anyone is using a different version, such as Microsoft XML, v4.0, then DOMDocument40 should be used. This is because the number at the end of the DOMDocument is specific to the version of the library being used.
I work with a VBA Excel Macro that someone else wrote and I was tasked with fixing it after recently upgrading from Windows 7 / Office 2010 to Windows 10 / Office 2016. I started to receive the same "user defined type not defined" compile error. My previous install also had MS XML v6.0 but apparently you have to specifically point to this version in your code on Windows 10 and/or Office 2016 (I wasn't able to confirm which upgrade caused the issue). I was able to resolve the issue by doing a Find/Replace on the following:
"DOMDocument" to "MSXML2.DOMDocument60"
"XMLHTTP" to "MSXML2.XMLHTTP60"
I am using Microsoft Windows 10 & Office 2016.
Using Microsoft XML 6.0 does not fix the problem.
Selecting Microsoft XML 3.0 fixed the compilation error
I had the 3rd and 6th versions installed, and the project uses the 4th one. I installed the 4th version from https://www.microsoft.com/en-us/download/details.aspx?id=15697 and this solved the problem.

Resources