How to open MS Access in Runtime using Excel VBA?

I am trying to open MS Access Runtime using VBA from an Excel file.

You can open the full version of Access with CreateObject("Access.Application") , but this does not open Access in Runtime.

On some computers, only the Microsoft Access Runtime is set, because all this is necessary to use the interfaces that we developed. Therefore, we need to open accdb files using MS Access Runtime, but from Excel.

Any help is appreciated, thanks

+5
source share
1 answer

You can use the shell to open the file, as if you entered this command on the command line of a window.

 d = Shell("pathToFile\Database1.accdb /runtime", vbNormalFocus) 

Another option that you could use to open in a file at runtime (if someone opens it from a folder or in some other way without the / runtime switch) would be to change the file extension to .accdr. This will always be a forced lead time.

+2
source

Source: https://habr.com/ru/post/1264466/


All Articles