Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to check for existence of a DSN
XL 2000
Can anyone point me to a bit of VBA that checks a user's PC for the existence of a DSN? Cheers GPO |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to check for existence of a DSN
You'll need to look in these three places.
file DSN's, %ProgramFiles%\Common Files\ODBC\Data Sources system DSN's You'll need to get the subkey with the DSN names HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources and also the subkey for each DSN HKLM\SOFTWARE\ODBC\ODBC.INI\ Also look for user DSN's in; HKCU\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources and also the subkey for each DSN HKCU\SOFTWARE\ODBC\ODBC.INI\ -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "GPO" wrote: | XL 2000 | Can anyone point me to a bit of VBA that checks a user's PC for the | existence of a DSN? | | Cheers | | GPO |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to check for existence of a DSN
GPO,
One way is read the registry. e.g enumerate the values at : HKEY_CURRENT_USER\Software\ODBC\ODBC.INI HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI See http://www.vb-helper.com/howto_create_dsn.html for examle. NickHK "GPO" wrote in message ... XL 2000 Can anyone point me to a bit of VBA that checks a user's PC for the existence of a DSN? Cheers GPO |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
co existence | Excel Discussion (Misc queries) | |||
Check for existence | Excel Discussion (Misc queries) | |||
Check File Existence | Excel Programming | |||
How do I check for existence of a worksheet? | Excel Worksheet Functions | |||
Code to check existence | Excel Programming |