What I'm looking for is a way to save the file under both the Excel 2002 format with the same name and create a copy using the Excel 95 format using a different name. Also if the user opts not to save the original file, no duplicate using the 95 format is created. Here is the code I currently have, but all it does is save the original file.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Not Me.Saved Then
Msg = "Do you want to save the changes you made to "
Msg = Msg & Me.Name & "?"
Ans = MsgBox(Msg, vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
Me.Save
Case vbNo
Me.Saved = True
Case vbCancel
Cancel = True
Exit Sub
End Select
End If
Application.DisplayAlerts = False
' Delete custom toolbar
Call DeleteToolBar
' Save file in Excel 95 format
Call SaveAs95
Application.DisplayAlerts = True
End Sub
Any suggestions would be greatly appreciated.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Not Me.Saved Then
Msg = "Do you want to save the changes you made to "
Msg = Msg & Me.Name & "?"
Ans = MsgBox(Msg, vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
Me.Save
Case vbNo
Me.Saved = True
Case vbCancel
Cancel = True
Exit Sub
End Select
End If
Application.DisplayAlerts = False
' Delete custom toolbar
Call DeleteToolBar
' Save file in Excel 95 format
Call SaveAs95
Application.DisplayAlerts = True
End Sub
Any suggestions would be greatly appreciated.