Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Folks,
I'm hoping this can be accomplishedin a macro... A user opens an excel file and fills out the necessary info for the prior days usage. I can create the button which links to the macro that saves the file as the previous days date and emails it as an attachment, but I would like the file to know where to save itself according to the month of the save as date. I have a folder named "2006" and subfolders named "January", February", etc... Is there a way through a macro to have the file save in the correct months' folder? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use
Dim strFileName as string strFileName = "Beginning of the path" & Year(Now()) & "\" & format(now()),"MMMM") & "\" & "rest of the path" ActiveWorkbook.Saveas strFileName Priya "Stephen" wrote in message ... Hi Folks, I'm hoping this can be accomplishedin a macro... A user opens an excel file and fills out the necessary info for the prior days usage. I can create the button which links to the macro that saves the file as the previous days date and emails it as an attachment, but I would like the file to know where to save itself according to the month of the save as date. I have a folder named "2006" and subfolders named "January", February", etc... Is there a way through a macro to have the file save in the correct months' folder? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good stuff... works like a charm.
Thanks! I appreciate the fast reply! "Priya" wrote: You can use Dim strFileName as string strFileName = "Beginning of the path" & Year(Now()) & "\" & format(now()),"MMMM") & "\" & "rest of the path" ActiveWorkbook.Saveas strFileName Priya "Stephen" wrote in message ... Hi Folks, I'm hoping this can be accomplishedin a macro... A user opens an excel file and fills out the necessary info for the prior days usage. I can create the button which links to the macro that saves the file as the previous days date and emails it as an attachment, but I would like the file to know where to save itself according to the month of the save as date. I have a folder named "2006" and subfolders named "January", February", etc... Is there a way through a macro to have the file save in the correct months' folder? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Templates - saving in specified folder | Excel Discussion (Misc queries) | |||
Macro to create a new folder according to the month | Excel Discussion (Misc queries) | |||
HELP! saving as xls in current folder | Excel Programming | |||
Saving file to a specific folder | Excel Discussion (Misc queries) | |||
Specify a folder for saving to?!?! | Excel Programming |