Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I am using the below routine, which I found in this newsgroup, but instead of saving the file as Postingsum011706.iif, it renames the current sheet, I don't want to change the worksheet name, I want to change the file name for Postingsum plus date, which is located in field C4. Public Sub PostingSumSave() Dim sStr As String Const sDateCell As String = "c4" Const SPath As String = "C:\access\" sStr = Format(Range(sDateCell), "mmddyy") ThisWorkbook.SaveAs Filename:=SPath & "PostingSum" & sStr & ".iif", _ FileFormat:=xlText, CreateBackup:=False If ThisWorkbook.Saved = False Then ThisWorkbook.Save Application.DisplayAlerts = True MsgBox "The Posting Summary for this week has been created, Saving and closing Workbook" ActiveWorkbook.Close End Sub I am also having problems suppressing the save messages, but I think that is related to it renaming the sheet, then of course it is asking to save the workbook. -- annep ------------------------------------------------------------------------ annep's Profile: http://www.excelforum.com/member.php...o&userid=18851 View this thread: http://www.excelforum.com/showthread...hreadid=503559 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to Save just one sheet to new workbook. | Excel Worksheet Functions | |||
How do I run a macro upon saving a file but prior to actual save? | Excel Discussion (Misc queries) | |||
how do I get a macro to save a sheet and set the file name? | Excel Discussion (Misc queries) | |||
Macro to save excel sheet in a workbook | Excel Discussion (Misc queries) | |||
Macro to insert values from a file and save another sheet as a .txt file | Excel Programming |