mrmmickle1
Well-known Member
- Joined
- May 11, 2012
- Messages
- 2,461
I am getting a Run Time Error -2147221164(80040154) Class Not Registered error on the below Red Line of code. I did not write this code and do not understand much about this issue but, I am hoping someone can point me in the right direction to fix it. The code works fine on other computers. The larger scope of the VBA project is to basically create a temporary database and run an SQL query to make a report, then put the report in Excel and finally delete the database. The error occurs in the creating database portion of the code.
I read a few blog entries that said this might have to do with the environment that I am working on. I am using a 64 bit system. I am questioning if this is a 32 bit COM Object? (I have no idea what this means) When I hover over this line of code it says: Provider=Microsoft.Jet.OLEDB.4.0;Data Source= MyFilePath .
I was wondering if there was an easy way to fix this without trying to add or register dll files. I am working on a system computer so I do not have Admin rights to register dll's etc...
Any help or knowledge on this subject would be great. I was hoping the fix would just be referencing a new object library or something??
I read a few blog entries that said this might have to do with the environment that I am working on. I am using a 64 bit system. I am questioning if this is a 32 bit COM Object? (I have no idea what this means) When I hover over this line of code it says: Provider=Microsoft.Jet.OLEDB.4.0;Data Source= MyFilePath .
I was wondering if there was an easy way to fix this without trying to add or register dll files. I am working on a system computer so I do not have Admin rights to register dll's etc...
Code:
[COLOR=#008000]'Create new database[/COLOR]
Set Catalog = CreateObject("ADOX.Catalog")
[B][COLOR=#ff0000] Catalog.Create dbConnectStr [/COLOR][/B][COLOR=#008000]'<----Error on this line[/COLOR]
Set Catalog = Nothing
Call SetAttr(dbPath, vbNormalNoFocus)
Any help or knowledge on this subject would be great. I was hoping the fix would just be referencing a new object library or something??
Last edited: