Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default After Save Event (Interop)

Hi All

Is there a way to get an after save event? or some workaround to do that?

thanks for your help
jahrens


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default After Save Event (Interop)

There is a way to emulate it. Here is an example using VBA
http://tinyurl.com/748cw

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jörgen Ahrens" wrote in message
...
Hi All

Is there a way to get an after save event? or some workaround to do that?

thanks for your help
jahrens




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default After Save Event (Interop)

The Save and SaveAs work perfectly. But make a change to the workbook, then
hit Close. Obviously you are prompted to save or not, which I want. But,
if the user selects yes, the code kicks in and kind of throws the file into
a loop of prompts. I just want the "before save" to fire, then close the
workbook.

is there a way to solve that problem?


"Bob Phillips" wrote in message
...
There is a way to emulate it. Here is an example using VBA
http://tinyurl.com/748cw

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jörgen Ahrens" wrote in message
...
Hi All

Is there a way to get an after save event? or some workaround to do that?

thanks for your help
jahrens






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default After Save Event (Interop)

Hi Jahrens,

I think you may try to use the code snippet below to see if that helps you.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ThisWorkbook.Saved = True
ThisWorkbook.SaveAs "C:\testABC.xls"
SaveAsUI = False
Cancel = True
End Sub

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default After Save Event (Interop)

I have seen an interesting solution:

Inside the BeforeSave Event make a call to OnTime and pass a
procedure(Macro) that should be executed. This procedure will be executed
right after the Save.

Is there a way to catch that event before the macro is executed?

thansk for your help
jahrens




Reply
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
Using interop.excel to open a workbook, the workbook doesn't ask to save changes. [email protected] Excel Programming 1 December 28th 05 10:23 PM
Example After Save Event Steph[_6_] Excel Programming 4 October 27th 05 01:42 AM
worksheet change event with .NET interop stavro Excel Programming 0 June 16th 05 05:57 PM
Excel Interop Catch Event for Saving a file as xls and as xml? m.ahrens Excel Programming 8 December 29th 04 02:11 PM
After save event Bart[_3_] Excel Programming 2 July 22nd 03 12:07 PM


All times are GMT +1. The time now is 01:18 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"