Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Saving to a certain month folder

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Saving to a certain month folder

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Saving to a certain month folder

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Templates - saving in specified folder Kathrine Excel Discussion (Misc queries) 4 October 30th 08 04:02 PM
Macro to create a new folder according to the month Dolphin Excel Discussion (Misc queries) 5 December 15th 06 01:31 PM
HELP! saving as xls in current folder drumerboy[_7_] Excel Programming 1 January 18th 06 02:04 PM
Saving file to a specific folder richkim2000 Excel Discussion (Misc queries) 1 January 25th 05 11:11 PM
Specify a folder for saving to?!?! solo_razor[_12_] Excel Programming 1 October 28th 03 10:14 AM


All times are GMT +1. The time now is 01:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"