Excel VBA 質問スレ Part83 (477レス)
Excel VBA 質問スレ Part83 http://mevius.5ch.net/test/read.cgi/tech/1749348402/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
417: デフォルトの名無しさん [sage] 2025/07/17(木) 08:47:01.58 ID:sGHKyXGW >>410 Dirでワイルドカードが使えるので、こんな感じに仕上げてみた ※ヒットするパスの例 → C:\Documents\A001\B000X1\Excel\20250717\FileABC001.xlsx HomePath = "C:\Documents" SearchPath = "A???\B*\Excel\2025????\File*.xlsx" ResultPath = HomePath SearchPathList = Split(SearchPath, "\") For I = 0 To UBound(SearchPathList) If Dir(ResultPath) <> "" Then ResultPath = "ファイルの下は何もないよ!" Exit For End If FolderName = Dir(ResultPath & "\" & SearchPathList(I), vbDirectory) If FolderName = "" Then ResultPath = "そんなパスはないよ!" Exit For End If ResultPath = ResultPath & "\" & FolderName Next MsgBox "これかな?" & vbCrLf & ResultPath http://mevius.5ch.net/test/read.cgi/tech/1749348402/417
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.024s