Try this:
Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'Jerry Beaucaire (11/17/2009)
'Always offer saveas with cell value from A1 on the a specifically named sheet
Dim SvName As String
SvName = Sheets("Sheet1").Range("A1").Value
If InStr(SvName, ".") > 0 Then SvName = Left(SvName, InStr(SvName, ".") - 1)
Application.EnableEvents = False
If SaveAsUI = True Then
Application.Dialogs(xlDialogSaveAs).Show SvName
Else
Me.Save
End If
Cancel = True
Application.EnableEvents = True
End Sub
If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
Bookmarks