No need to apologize. I greatly appreciate your assistance. I will try to give a clearer explanation of what I am after.
If you open the ODBC control panel, there is a button labelled Add. Click this button and you get another dialog box where you choose the driver to use, give the data source a name and enter other settings. This data source definition will then appear under the User DSNs tab or the System DSNs tab if that was selected before creating the new instance. My users already have these DSNs set up, one for each database they need to connect to. Ocassionally, a new database is added or one may be dropped or have some aspect altered.
I have created an Excel application as an add-in that has the current information stored in a worksheet but because these databases may change as I just stated, I have created a dialog box that allows the end-user to edit the list of DSNs stored in the worksheet. Rather than have the user simply type in the name of the DSN to use as it appears in the control panel, I would like to have a drop-down list that they can select from since some users don't even know how to access it or even if they did they might mis-type it. By the way, these DSNs are updated automatically by a corporate log-on script that I have no control over.
All I want is an array of strings that contains the names of the data source definitions configured on the computer running my app. You have already given me the path to the User and System DSNs, now all I need is a little help figuring out how to get this list out of the registry. As I mentioned before, given the path and registry key name, I have code that will return the value (for example, the UserID, password, etc). What I need help with however, is in obtaining the list of entries at a path two levels higher in the registry. That is, I want the list of items at ODBC.INI as an array of strings. I hope this better describes what I am trying to do. Thanks again for all your help.
Best regards,
Vlip