Re: Macro file save as, saving sheet not workbook

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You're saving as an .iif file? What's that?


"annep" <annep.21yl3z_1137803402.0643@xxxxxxxxxxxxxxxxxxxxx> wrote in
message news:annep.21yl3z_1137803402.0643@xxxxxxxxxxxxxxxxxxxxxxxx
>
> 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
>


.


Quantcast