Thread: SaveAsUI
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gun_Maddie Gun_Maddie is offline
external usenet poster
 
Posts: 5
Default SaveAsUI

Here is the code that I have written, for some reason I am unable to
get the Save As dialog box to appear, the spreadsheet just saves and
closes. Any suggestions?

Private Sub Workbook_BeforeClose(ByVal SaveAsUI As Boolean, Cancel As
Boolean)

Msg = "Do you want to save the expense report?"
Ans = MsgBox(Msg, vbYesNo)
Select Case Ans
Case vbYes
ActiveWorkbook.SaveAs
Case vbNo
ActiveWorkbook.Close
End Select
End If

End Sub