Change style select folder

I wonder how to use this style to select a folder?

enter image description here

I ask about this after searching for the ability to search for such files:

Set wShell=CreateObject("WScript.Shell")
Set oExec=wShell.Exec("mshta.exe ""about:<input type=file id=FILE><script>FILE.click();new ActiveXObject('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>""")
sFileSelected = oExec.StdOut.ReadLine
If sFileSelected = "" Then
    WScript.Echo "Canceled"
Else
wscript.echo sFileSelected
End If

enter image description here

+4
source share
1 answer

Try the following:

Set chosenfolder = CreateObject("shell.application").BrowseForFolder(0,"Select a folder",0)
0
source

All Articles