I'm trying to obtain the Excel Product Id key via VBA to use in a simple workbook licensing system. I want the Excel Product Id shown by the Excel Help. The workbook usage will be limited to licensed machines.

I've looked at the earlier thread "Excel Product Key via VBA" and picked up the code to read the registry.

The problem is the organization of the registry. Where do I look in the registry to find the Excel Product Id Key for all Excel installations?

I have MS Office 2003 installed. To obtain the Excel key, I use:

"Software\Microsoft\Office\11.0\Registration" & Application.ProductCode

and the "ProductId".

I doubt this will work if the user has a different version of MS Office installed or only Excel. I need the general method to find the Excel key.

Does anybody know how to find the Excel Product Id key in the registry for all (most?) Excel installations?

Also, Please submit any suggestions you have for better machine specific key(s).

thanks.