hope someone can help with excel save with 2003 and 2007installed on my computer
Hi. The code below should be input in Thisworkbook object rather than
a seperate macro.. You can also force a name as well..
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Application.EnableEvents = False
filesavename = Application.GetSaveAsFilename(fileFilter:="Microso ft
Excel File (*.xlsx), *.xlsx")
If filesavename < False Then
On Error Resume Next
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:=filesavename
Application.DisplayAlerts = True
On Error GoTo 0
End If
Application.EnableEvents = True
Cancel = True
End Sub
|