Modern-UI-Components-for-VBA icon indicating copy to clipboard operation
Modern-UI-Components-for-VBA copied to clipboard

File not found: VBA_TOOLS.DLL

Open mattman73 opened this issue 5 years ago • 15 comments

I have been using this DLL on different PC/laptop but when I installed on a Windows 10 64bit OS, I'm getting this error on loading the dll I have double checked the location and I can not see anywhere where to unblock the dll. Would I need to install .net framework and if so what version. Thanks Matt

mattman73 avatar Jun 06 '19 08:06 mattman73

File not found could be something else but to answer your question, the project uses .NET 4.6

krishKM avatar Jun 06 '19 08:06 krishKM

Ok I have checked the .net framework and 4.7.2 is installed do you know if there are any other issues around the file not found.

mattman73 avatar Jun 06 '19 09:06 mattman73

Is the file really on the location you say it is? Within the DLL function, LoadLibrary (System.GetBasePath & "VBA_TOOLS.dll") is the System.GetBasePath or whatever funciton that returns the application path returning correct path?

krishKM avatar Jun 06 '19 09:06 krishKM

yes, double check the dll / bin folder location some code works on other PCs.

mattman73 avatar Jun 06 '19 09:06 mattman73

Are you using the 64bit dll and 64bit dlls for bin folder? It also could be that dependency dlls from bin path are being blocked

you can get the x64 version from here: (beware functions may have changed from your version) Dll and bin

krishKM avatar Jun 06 '19 09:06 krishKM

I'm using the 32bit version and I have checked the dll in the bin folder and none are being blocked, moving over to the 64bit version would take some time and then might cause issues with other install. I just need to understand why the file is not loading, thanks you for your help. Matt

mattman73 avatar Jun 06 '19 10:06 mattman73

Ah okay, you are on 64bit but using 32bit dlls? I don't think the current setup would work because usually 64bits cannot load 32bit dlls. how about having both 64 and 32 bit dlls and your vba code #if Win64 then load 64bit dll #else load 32bit dll #endif

would that be an option?

krishKM avatar Jun 06 '19 11:06 krishKM

yes it is 64bit os but 64bit dll do not work when running the 64bit dll I get run-time error '91', commenting out the on error resume next the error changes to run-time error '438' object doesn't support this property or method.

mattman73 avatar Jun 06 '19 11:06 mattman73

64 bit os, 64bit office, you have tried 32 and 64bit dll and you are having issue with both dlls?

64bit office using 32bit dlls won't work 64bit office using 64bit dll should work. Please check this with the current sample file. 32bit office with 32bit dll should work too. 32bit office with 64bit dll won't work.

krishKM avatar Jun 06 '19 12:06 krishKM

64 bit os and 64 bit office and 32bit dll or 64bit dll not working using the sample code.

mattman73 avatar Jun 06 '19 12:06 mattman73

has this been sorted matt?

krishKM avatar Jul 08 '19 10:07 krishKM

Hi No, I never worked out why this did not work and had to move on to a different project so if you have any updates that would be great. Thanks Matt

mattman73 avatar Jul 08 '19 11:07 mattman73

Interesting. You said same code works on other PC. Any chance you can share a sample project from you? Either dropbox or onedrive download link? or would it be possible to share your screen (any remote or skype rDP tool) so I can have a look to understand the problem?

krishKM avatar Jul 08 '19 11:07 krishKM

I have just moved to a new PC and using the same code the dll is not working now as the ShowDialogforfilearray is missing from the x64 dll, can you let me know what I can use instead to return the files string. Thanks, Matt

mattman73 avatar Jan 02 '20 13:01 mattman73

Latest changes are published. Please have a look

krishKM avatar Jan 02 '20 14:01 krishKM