Thread: File SaveAS
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mickmoo Mickmoo is offline
external usenet poster
 
Posts: 3
Default File SaveAS

Thanks Jim,

I follow the point about Excel displaying a message enabling the user to
cancel the operation (assuming displayalerts isn't suppressed) , but they
still have the ability to click Yes and overwrite the file.
What I need to be able to do is trap the new filename before the save
operation operation occurs, compare it with the name of the file I do not
wish overwritten, and then cancel the save operation if the two names match.

Can this be done?

Many thanks


"Jim Cone" wrote:

Excel automatically displays a message if a file is being overwritten
unless your code suppresses the display of alert messages.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Mickmoo"

wrote in message
Hello,
I'm rather new to Excel coding so forgive me if this question sounds naive.
I'm trying to find a property that that I can use in the Workbook_BeforeSave
event in order to identify whether the user is trying to overwrite a specific
file on disk (by using the File SaveAs command), so that I can inform them of
this and cancel the Save event.
Thanks in advance for any assistance.