下面是引用w791212w於2008-08-03 20:49發表的 :
假設:要尋找D:\ 全部的資料夾要怎寫??
由於
提問方式太簡單
所以
回答方式也簡單
1.用物件Drive + Dir 寫
2.或用以下四個 Function 寫
Private Declare Function SHBrowseForFolder Lib "shell32" _
(lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" _
(ByVal pidList As Long, ByVal lpBuffer As String) As Long
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" _
(ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long