Re: Save As Macro
From: Mike Tomasura (MTomasura__at___.com)
Date: 02/17/04
- Next message: Sonny Maou: "Re: Excel's VBA <> Word's VBA?"
- Previous message: Hawk: "*** count"
- In reply to: Ronbo: "Save As Macro"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: Save As Macro"
- Reply: anonymous_at_discussions.microsoft.com: "Re: Save As Macro"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Feb 2004 16:34:35 -0500
Try this.
Private Sub CommandButton1_Click()
tmpName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 10)
Select Case Month(Now())
Case 1
tmpMonth = "Jan "
Case 2
tmpMonth = "Feb "
Case 3
tmpMonth = "Mar "
End Select
tmpYear = Right(Year(Now()), 2)
ActiveWorkbook.SaveAs FileName:="C:\WINDOWS\Desktop\" _
& tmpName & tmpMonth & tmpYear, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
Michael Tomasura
"Ronbo" <anonymous@discussions.microsoft.com> wrote in message
news:820801c3f58a$b7cec820$7d02280a@phx.gbl...
> I save files "name +date" such as. "dell may 03" date
> always has the last six spaces . i.e. next month will
> be "dell jun 03"
>
> I am looking for a macro that after completing procedures
> in a workbook would open the "Save As" dialog box and 1.
> remove the previous date 2. save the file as "name + new
> date" The update is always done in the month of the file
> date.
>
> Any help would be very much appreciated.
>
>
- Next message: Sonny Maou: "Re: Excel's VBA <> Word's VBA?"
- Previous message: Hawk: "*** count"
- In reply to: Ronbo: "Save As Macro"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: Save As Macro"
- Reply: anonymous_at_discussions.microsoft.com: "Re: Save As Macro"
- Messages sorted by: [ date ] [ thread ]