Hello,
I have a question about references in vba, how can you (if you can) made a macro working on every version of a program ?
For example I have a macro with the "Microsoft Excel 16.0 Object Library" that work well. But on some computer, the macro won't run because of an older library reference "Microsoft Excel 15.0 Object Library" in my case. I guess the issue is the same for all programs.
I looked at "early and late binding", import references directly in the code, update all the computers ....
But what is the good practice to make a macro "update-proof" ?
Thanks
Technically you cannot.
VBA macro need to reference libraries that are installed on the computer. Unless you make a installation package including all the libraries you need. In your case, you need to make sure all computer have same version of Excel installed. I don't know if the macro will run without Excel.
You could try reference the oldest version you can find. Since newer versions are supposed to be backward compatible.