[VBScript]選擇資料夾視窗(Select Folder Dialog)
' Standard housekeeping Dim objFolder, objItem, objShell SelectFolder = vbNull ' Create a dialog object Set objShell = CreateObject( "Shell.Application" ) Set objFolder = objShell.BrowseForFolder( 0, "Select Folder", 0, myStartFolder ) ' Return the path of the selected folder If IsObject( objfolder ) Then SelectFolder = objFolder.Self.Path ' Standard housekeeping Set objFolder = Nothing Set objshell = Nothing
參考資料:http://www.robvanderwoude.com/vbstech_ui_selectfolder.php
留言
張貼留言