PDA

View Full Version : Check if library exists



response
04-18-2017, 11:44 PM
Hi, I need help. How to check if library exists? I have library name and I would check if library exists. If library doesn't exists then macro should this library turn on.

snb
04-19-2017, 01:19 AM
simply use createobject("libraryname")

If it's loaded it wil be used

If it's not loaded it will be loaded and used.

response
04-19-2017, 01:58 AM
Thanks snb. Doesn't work :( Show me "ActiveX component can't create object". How to fix? I should give the path to library or only library name?

snb
04-19-2017, 02:32 AM
library name

response
04-19-2017, 05:23 AM
Uhm, doesn't work.

I receive error "ActiveX component can't create object".

My code

CreateObject ("Microsoft ActiveX Data Objects 2.8 Library")

snb
04-19-2017, 08:07 AM
With CreateObject("ADODB.recordset")

response
04-20-2017, 02:14 AM
Thanks, and how to enabled "Microsoft Visual Basic for Applications Extensibility 5.3" library?

snb
04-20-2017, 03:25 AM
see: http://www.snb-vba.eu/VBA_Excel_VBproject_en.html

response
04-20-2017, 06:31 AM
Wow, snb You're the best! :beerchug: Thanks You very much!