View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default 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