Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening file question
Hi all,
Is it possible to open a file if you only know part of the file name ? For example, using a wild card. file name is "Regressliste UX_01.06.08 To 30.06.08.xls" - The dates can vary so i would only like to use "Regressliste UX *.xls", is this possible ?? Any help would be greatly appreciated. -- Les |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening file question
Les,
try this Sub standard() getbook = True Do If getbook = True Then Filename = Dir("c:\Book*.xls")' Change to suit getbook = False Else Filename = Dir() End If If Filename < "" Then Workbooks.Open Filename:=Filename 'Do something End If Loop While Filename < "" End Sub Mike "Les" wrote: Hi all, Is it possible to open a file if you only know part of the file name ? For example, using a wild card. file name is "Regressliste UX_01.06.08 To 30.06.08.xls" - The dates can vary so i would only like to use "Regressliste UX *.xls", is this possible ?? Any help would be greatly appreciated. -- Les |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening file question
Thanks Mike H
-- Les "Mike H" wrote: Les, try this Sub standard() getbook = True Do If getbook = True Then Filename = Dir("c:\Book*.xls")' Change to suit getbook = False Else Filename = Dir() End If If Filename < "" Then Workbooks.Open Filename:=Filename 'Do something End If Loop While Filename < "" End Sub Mike "Les" wrote: Hi all, Is it possible to open a file if you only know part of the file name ? For example, using a wild card. file name is "Regressliste UX_01.06.08 To 30.06.08.xls" - The dates can vary so i would only like to use "Regressliste UX *.xls", is this possible ?? Any help would be greatly appreciated. -- Les |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
enable macros question not being asked when opening file | Excel Discussion (Misc queries) | |||
File:1 and File:2 -- Double Files when Opening One File | Excel Discussion (Misc queries) | |||
Question in opening Excel file. | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
In addition to previous question, if opening an Excel file in NON-read-only mode, would the macros on the worksheets work as well? | Excel Programming |