View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Working with directories question

Do you not know where the month folder is?

if you do

sPath = "C:\mysubfolder1\mysubfolder2\" & format(Date,"mmmm") & "\"

workbooks.Open sPath & Format(Date,"yyyymmdd.xls")

Adjust the Format(Date, . . . ) part to reflect the naming convention for
your file.

--
Regards,
Tom Ogilvy




"Helen" wrote in message
...
I would like to have amacro that follows a path until it gets to the

"Month"
Subfolder. At this point it would check the month against the month in the
folder name and open the releated subfolder where a file will exist that

I
would open in much the same way.

Is it possible? What do I need to get started?