开发者

running regsvr using VBA

Is there a way I can run regsvr32.exe to register a dll using VBA? My software is in access (dont blame me, blame the company).

Access for some reason always references the old version of the DAO library. After about 2 hours of searching the int开发者_StackOverflow社区ernet, someone suggested registering the library, and viola it worked. It cut down my time from 2 minutes (copying a recordset cell by cell) to about 1 second.

so 1) How can I call regsvr32.exe using VBA?

2) Does this utility exist in vista and 7? company is using XP right now, but there tech services are piloting win 7 and hopefully deploy it on all the computers by end of the year. My application can not stop working!


What version of DAO do you currently have as a reference in your Access database file?

If Access is referencing an older version of DAO then it sounds like an install routine is erronously installing it. Especially if it's DAO 3.6 as that comes as part of the Windows 2000 OS and newer. DAO 3.5 and 3.6 shuold only be found in C:\Program Files\Common Files\Microsoft Shared\DAO. If anywhere else that's wrong.

You can run the shell command to register the DAO DLL.

shell("regsvr32 ""C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll""")

If you are working with languages other than English you will need to use the CSIDL routine to find the language specific version of "Program Files".

I don't recall if regsvr32 requires admin privileges. That's certainly possible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜