View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Opening a file with changing dates

fName = Dir(foldername & "\ABC*")
if fName < "" Then
Set Wkb2 = Workbooks.Open(Filename:=fName)
End If


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"kingkdz" wrote in
message ...

I want to open a file which has a filename ABC followed by anything. I
thought this should have worked, but it is not.

Set Wkb2 = Workbooks.Open(Filename:=foldername & "\ABC*")

Can someone please correct it? Thanks in advance


--
kingkdz
------------------------------------------------------------------------
kingkdz's Profile:

http://www.excelforum.com/member.php...o&userid=35783
View this thread: http://www.excelforum.com/showthread...hreadid=555483