Macro file save as, saving *** not workbook
- From: annep <annep.21yl3z_1137803402.0643@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Jan 2006 18:28:25 -0600
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 ***, I don't want to change the work*** 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 ***, then of course it is asking
to save the workbook.
--
annep
------------------------------------------------------------------------
annep's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=18851
View this thread: http://www.excelforum.com/showthread.php?threadid=503559
.
- Follow-Ups:
- Re: Macro file save as, saving *** not workbook
- From: Dave Peterson
- Re: Macro file save as, saving *** not workbook
- From: Barb Reinhardt
- Re: Macro file save as, saving *** not workbook
- Prev by Date: Re: Excel Add-in for better graphics
- Next by Date: Re: How to advance one column to right?
- Previous by thread: Get ColorIndex Number for Cell in a Range
- Next by thread: Re: Macro file save as, saving *** not workbook
- Index(es):