Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatic choose of dir path
hello
I've got one problem.. I backup some files in excel and I want them to be in different directories: if its may 2007 then the file is saved: C:\backup\2007\may\*.txt I can write them in chosen directories but I want it to be automatic: DatePart("yyyy", Date) and if yyyy = 2007 macro is choosing c:\backup\2007 any help would be helpfull!! thx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatic choose of dir path
With ActiveWorkbook
.SaveAs "C:\backup\" & DatePart("yyyy", Date) & "\" & .name" End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "bratek" wrote in message ups.com... hello I've got one problem.. I backup some files in excel and I want them to be in different directories: if its may 2007 then the file is saved: C:\backup\2007\may\*.txt I can write them in chosen directories but I want it to be automatic: DatePart("yyyy", Date) and if yyyy = 2007 macro is choosing c:\backup\2007 any help would be helpfull!! thx |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatic choose of dir path
Hi bratek
You can creat the save path like this MsgBox "C:\backup\" & Format(Date, "yyyy") & "\" & Format(Date, "mmm") & "\" -- Regards Ron de Bruin http://www.rondebruin.nl "bratek" wrote in message ups.com... hello I've got one problem.. I backup some files in excel and I want them to be in different directories: if its may 2007 then the file is saved: C:\backup\2007\may\*.txt I can write them in chosen directories but I want it to be automatic: DatePart("yyyy", Date) and if yyyy = 2007 macro is choosing c:\backup\2007 any help would be helpfull!! thx |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
automatic choose of dir path
thx!!! works perfectly!! maybe except the second option "mmm" I used
"m" and it works :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I set up automatic path/file name for new workbooks? | Excel Discussion (Misc queries) | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions | |||
Current path to Qualified Path | Excel Programming | |||
Can the user "Choose" the path via a VBA command? | Excel Programming |