Hi Holmes,
There is a possible way to open a folder by clicking on a button under the pre-stored path. Let say you want to open a folder name "C:\Program Files\Ares". First you need to declare ShellExecute.
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (Byval hWnd as Long...)
Then you need to do this code:
Sub OpenFolder (strURL as String, iWindowStyle as Integer, fH as Long)
Dim Folder as Long
Folder = ShellExecute(fH, "Open", strURL, 0&, 0&, iWindowStyle)
End Sub
Then on the command button code you need to put this line;
Call OpenFolder ("C:\Program Files\Ares", 10, 1)
You can try this code and it work very well in my previous project.
Enter your message below
Sign in or Join us (it's free).