3
我現在有這樣的代碼:是否有可能使此代碼獲取文件和文件夾?
Function GetSubDir(ByVal sDir)
Dim oFS As New FileSystemObject
Dim oDir
iCount = 1
Erase subArray()
Set oDir = oFS.GetFolder(sDir)
For Each oSub In oDir.SubFolders
MsgBox oSubPath
GetSubDir oSub.Path
ReDim Preserve subArray(iCount)
subArray(iCount) = oSub.Path
iCount = iCount + 1
Next oSub
End Function
是否有修改它,使它變得文件和文件夾的方法嗎?我試過看MSDN,但對我來說這很陌生,它是一種簡單的語法變化,還是整個代碼需要返工?由於