View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
crispbd[_12_] crispbd[_12_] is offline
external usenet poster
 
Posts: 1
Default Saving with a filename already in a cell


Copy and paste this macro into a module in your workbook.
This macro demands that the value in cells(4,5) - Cell E4, contains
Date Value, not just a text representation of the date. (something lik
11/01/2004')

Sub SaveMonthlyReport

Dim MyFileName As String
MyFileName = "Monthly Report " & MonthName(Month(Cells(4, 5).Value)
True)
& " " & Year(Cells(4, 5).Value)
ActiveWorkbook.SaveAs Filename:= _
MyFileName & ".xls"

End Su

--
crispb
-----------------------------------------------------------------------
crispbd's Profile: http://www.excelforum.com/member.php...fo&userid=1088
View this thread: http://www.excelforum.com/showthread.php?threadid=27458