ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs Read Only (https://www.excelbanter.com/excel-programming/338949-saveas-read-only.html)

ryanmhess

SaveAs Read Only
 
Below is the code I use to make a copy of sheet 3 in my work book and save
just sheet 3 to a new file saved as a unique value in cell B15. The new
files will be accessable by many people and I would like it if the file was
saved as Read Only so they dont alter any content in the file. Is there an
easy way to alter my VBA code to make this possible rather than going through
each file and protecting them myself?

Sheets("Sheet3").Select
Sheets("Sheet3").Copy
ActiveWindow.ScrollRow = 1
ActiveWorkbook.SaveAs Filename:="\\Hci\HCI Share\C of A's - Building
4\00-RMHTest-6 Parameters\" & _
Range("B15").Value & ".xls"
ActiveWorkbook.Close
Sheets("Sheet1").Select


ryanmhess

SaveAs Read Only
 
EDIT:

The new files will be accessable by many people and I would like it if the
file was saved as Read Only or saved with the entire sheet protected so they
dont alter any content in the file. Is there an easy way to alter my VBA
code to make this possible rather than going through each file and protecting
them myself?




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

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