opening a file

T

Tom Ogilvy

sName = dir("C:\Myfiles\tb24.02.04*.xls")
if sname <> "" then
Workbooks.Open "c:\myfiles\" & sname


End if
 
M

Matt B

Is it possible to open a file by specifying only part of its file name?

For example im trying to open:

"tb24.02.04for23.02.04" (ie today for previous working day)

by only stating tb24.02.04. The reason for this is that the second date is
not always the previous date - its the previous working day , so i cannot
simply use day -1.

TIA

Matt
 
Top