PC Review


Reply
 
 
Steven
Guest
Posts: n/a
 
      7th Jun 2008
I have used Before Save code but is there a way to do After Save code?


Thank you,

Steven
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      7th Jun 2008
Caters for both Save and SaveAs

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim sFile
Application.EnableEvents = False
'<Optional - this would be before save code>
Cancel = True
If SaveAsUI Then
sFile = Application.GetOpenFilename("Excel Files (*.xls), *.xls")
If sFile <> False Then
ThisWorkbook.SaveAs sFile
'<Optional - this would be after save code>
End If
Else
ThisWorkbook.Save
'<Optional - this would be after save code>
End If
Application.EnableEvents = True
End Sub


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Steven" <(E-Mail Removed)> wrote in message
news:64F4BBDF-3EAE-4608-B67B-(E-Mail Removed)...
>I have used Before Save code but is there a way to do After Save code?
>
>
> Thank you,
>
> Steven



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clicking save results in both 'save as' word and save as draft =?Utf-8?B?aGI=?= Microsoft Outlook Discussion 0 15th Nov 2006 01:14 AM
Disable save, save as, but allow save via command button =?Utf-8?B?VGltTg==?= Microsoft Excel Programming 10 1st Sep 2006 07:05 PM
Word 2002 save as menu says save as web page instead of just save as? Gary Microsoft Word Document Management 1 28th Jul 2006 03:26 PM
How to diasble save and save as menu but allow a save button hon123456 Microsoft Excel Programming 1 12th Jun 2006 09:50 AM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff Microsoft Excel Programming 8 10th Nov 2005 12:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:24 AM.