LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"