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: 389
Default BeforeSave

I have a file that is used by another person in their directory. When they
save the file I do various tests on values of certain range named cells and
if all the values are ok then that means the file is basically in good order
and I want a copy. The issue is they sometimes mess up a file and don't
realize it until they have mess it up even more, but it I can get a copy
when all test conditions are ok then I will always have the last good copy
handy. I was hoping to do somethin like this:

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

If (Here are various tests and if OK) Then
ActiveWorkbook.SaveAs Filename:="F:\Shared\Systems\Book3.xls",
FileFormat:= xlNormal, Password:="mybackup"
Endif

End Sub
And then it would go ahead and save their file in their directory.

Note: I would alwasy like their file saved and only save to my directory if
all the tests are ok. I have tried the above but excel errors totally out
where you get the message. Do you want to send a report to Microsoft?

Is there a way to do what I want?

Thank you for your help.

Steven
 
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
BeforeSave Problem Andibevan[_4_] Excel Programming 14 August 12th 05 05:15 PM
beforesave and beforeclose Adam Harding Excel Programming 2 July 25th 05 11:11 AM
BeforeSave event Carl Bowman Excel Discussion (Misc queries) 4 February 6th 05 12:28 PM
BeforeSave Sub Phil Hageman[_3_] Excel Programming 6 January 14th 04 10:12 AM
VBA - BeforeSave - NEED HELP HRobertson Excel Programming 2 October 23rd 03 06:50 PM


All times are GMT +1. The time now is 05:19 PM.

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"