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: 1
Default Excel XP and WorkbookBeforeSave

The following code snippet works fine in Excel 2003, but XP behaviour is
different.
In Excel XP I get prompted to save the file twice.
Any ideas - TIA Dave

Private Sub m_ThisApplication_WorkbookBeforeSave(ByVal Wb As
Microsoft.Office.Interop.Excel.Workbook, ByVal SaveAsUI As Boolean, ByRef
Cancel As Boolean) Handles m_ThisApplication.WorkbookBeforeSave

If SaveAsUI Then
sBeforeSaveFilename = Wb.Name
m_ThisApplication.EnableEvents = False
m_ThisApplication.Dialogs(xlDialogSaveAs).Show()

' prevent a second save
m_ThisApplication.EnableEvents = True
Cancel = True
End If
Wb = Nothing

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
WorkbookBeforeSave Problem Steve Excel Discussion (Misc queries) 2 November 1st 09 10:01 AM
Handling WorkbookBeforeClose and WorkbookBeforeSave Tom Ogilvy Excel Programming 0 September 19th 03 06:27 PM


All times are GMT +1. The time now is 02:06 AM.

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

About Us

"It's about Microsoft Excel"