Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Cue Cue is offline
external usenet poster
 
Posts: 47
Default newfold_and_aways_save_to_newfold

I want the to always save the file to the folder that was created with me
changing the directory. The following works fine until it gets to the Active
Workbook Save file part.

Sub newfold_and_aways_save_to_newfold()
Dim strNewFolderName As String
strNewFolderName = MonthName(Month(Now()))
If Len(Dir("H:\2007 C.Morgan ADM017\2007 Revenue Assurance ADM017\ADT
Errors\2008\" & strNewFolderName, vbDirectory)) = 0 Then
MkDir ("H:\2007 C.Morgan ADM017\2007 Revenue Assurance ADM017\ADT
Errors\2008\" & strNewFolderName)
End If
ActiveWorkbook.SaveAs Filename:= _
"H:\2007 C.Morgan ADM017\2007 Revenue Assurance ADM017\ADT
Errors\2008\" & strNewFolderName \ "RA - ADT Errors Reported - " &
Format(Date, "mmm d") & ".xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

End Sub

Is that possible? If so, can someone show me how?
--
Cue
  #2   Report Post  
Posted to microsoft.public.excel.misc
Cue Cue is offline
external usenet poster
 
Posts: 47
Default newfold_and_aways_save_to_newfold

I want to always save the file to the folder that was created without me
changing the directory. The following works fine until it gets to the Active
Workbook Save file part.

Sub newfold_and_aways_save_to_newfold()
Dim strNewFolderName As String
strNewFolderName = MonthName(Month(Now()))
If Len(Dir("H:\2007 C.Morgan ADM017\2007 Revenue Assurance ADM017\ADT
Errors\2008\" & strNewFolderName, vbDirectory)) = 0 Then
MkDir ("H:\2007 C.Morgan ADM017\2007 Revenue Assurance ADM017\ADT
Errors\2008\" & strNewFolderName)
End If
ActiveWorkbook.SaveAs Filename:= _
"H:\2007 C.Morgan ADM017\2007 Revenue Assurance ADM017\ADT
Errors\2008\" & strNewFolderName \ "RA - ADT Errors Reported - " &
Format(Date, "mmm d") & ".xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

End Sub

Is that possible? If so, can someone show me how?
--
Cue

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



All times are GMT +1. The time now is 12:43 PM.

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"