Thread: Update filename
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Update filename

Try something like

Dim FName As String
FName = "K:\Collections\Client AR\AR" & Format(Now+1, "mmddyy") &
".xls"
Workbooks.Open Filename:=FName

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"odonnke " wrote in
message ...
I want be able to have the code update automatically. below is

the code
now, I need to manually update the filename every day as a new

one is
created everyday, how can I put in code that knows that

tomorrows file
will be AR042904.xls. I also need to look at the previous days

file
name too. Any ideas
Workbooks.Open Filename:="K:\Collections\Client

AR\AR042804.xls"


---
Message posted from http://www.ExcelForum.com/