Sure....this is way one:
************************
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim weekending As Date, weektext As String
Dim filename As String
weekending = Sheets("Corporate").Range("g5").Value2
weektext = Replace(weekending, "/", "")
filename = Application.GetSaveAsFilename("C:\Reports\Marketing\Top 50\top 50
w-class 1 " & weektext & ".xls")
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename, xlNormal
Application.DisplayAlerts = True
End Sub
This is way two - using the event to call a sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
End Sub
and this is the sub in a module:
Private Sub saveit()
Dim weekending As Date, weektext As String
Dim filename As String
weekending = Sheets("Corporate").Range("g5").Value2
weektext = Replace(weekending, "/", "")
filename = Application.GetSaveAsFilename("C:\Reports\Marketing\Top 50\top 50
w-class 1 " & weektext & ".xls")
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs filename, xlNormal
Application.DisplayAlerts = True
End Sub
Any ideas? I'm pulling my hair out on this one.