Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro to prevent saving

Does any one know a macro for preventing the user to save

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Macro to prevent saving

A really determined user? No, can't be done. A casual user? In the
Workbook's BeforeSave event, put in the line

Cancel = True

and that will cancel the save.

HTH,
Bernie
MS Excel MVP

"stols121 " wrote in message
...
Does any one know a macro for preventing the user to save?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Macro to prevent saving

Hi
one way: Put the following code in your workbook module:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
MsgBox "Saving not allowed"
Cancel = True
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

Does any one know a macro for preventing the user to save?


---
Message posted from http://www.ExcelForum.com/


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
Prevent saving and allow only through Macro Lester from AUS Excel Discussion (Misc queries) 2 March 14th 07 02:39 PM
Prevent Saving muniz Excel Discussion (Misc queries) 0 February 15th 07 04:26 PM
How do I prevent saving an excel file if cells are blank? Leighann Excel Worksheet Functions 1 November 4th 06 07:40 PM
Prevent user from saving workbook keithl816 Excel Discussion (Misc queries) 3 January 15th 06 10:24 PM
prevent saving a worksheet looking4help Excel Discussion (Misc queries) 2 March 17th 05 10:14 PM


All times are GMT +1. The time now is 09:40 PM.

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

About Us

"It's about Microsoft Excel"