ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change To Read Only (https://www.excelbanter.com/excel-programming/386374-change-read-only.html)

Keep It Simple Stupid

Change To Read Only
 
When I send the Excel Workbook via email, it is automatically Read Only,
however, when the user opens the file and saves it, the file is no longer
read only.

I want to allow users of the program to edit cells, run macros, etc,
however, I do not want them to be able to save over the original Excel
spreadsheet that I originally sent.

How can I use VBA to automatically prompt (after running the macro) to Save
As - WITHOUT specifying a path/filename? I cannot have it automatically save
as a specific path because everyone's will be different (due to user names,
etc).

NickHK

Change To Read Only
 
Check out the Workbook_BeforeSave event. You can check the value of SaveAsUI
and set Cancel=true if required.
Also, Application.GetOpenFilename may be useful.

NickHK

"Keep It Simple Stupid" wrote
in message ...
When I send the Excel Workbook via email, it is automatically Read Only,
however, when the user opens the file and saves it, the file is no longer
read only.

I want to allow users of the program to edit cells, run macros, etc,
however, I do not want them to be able to save over the original Excel
spreadsheet that I originally sent.

How can I use VBA to automatically prompt (after running the macro) to

Save
As - WITHOUT specifying a path/filename? I cannot have it automatically

save
as a specific path because everyone's will be different (due to user

names,
etc).





All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com