Excel VBA 質問スレ Part83 (572レス)
上下前次1-新
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん
リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
426: デフォルトの名無しさん [sage] 2025/07/18(金) 08:22:30.72 ID:avd6O0J8(1) AAS
>>417 はちょっと手抜きしてたので、ちゃんと作り直した。
Sub 使い方()
Set Result = New Collection
DirMulti "C:\Documents", "A???\B*\Excel\2025????\File*.xlsx", Result, vbNormal
(以下略)
End Sub
Sub DirMulti(HomePath, SearchPath, ResultCollection, Optional Attributes As VbFileAttribute = vbNormal)
Pos = InStr(SearchPath & "\", "\")
Search = Left(SearchPath, Pos - 1)
NextSearch = Mid(SearchPath, Pos + 1)
Set SearchResult = New Collection
Res = Dir(HomePath & "\" & Search, vbDirectory Or Attributes)
Do While Res <> ""
If Res <> "." And Res <> ".." Then SearchResult.Add Res
Res = Dir()
Loop
If NextSearch = "" Then
For Each Res In SearchResult
ResultCollection.Add HomePath & "\" & Res
Next
Else
For Each Res In SearchResult
If (GetAttr(HomePath & "\" & Res) And vbDirectory) <> 0 Then
DirMulti HomePath & "\" & Res, NextSearch, ResultCollection, Attributes
End If
Next
End If
End Sub
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.014s