ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HOW TO PROTECT SAVEAS FILE (https://www.excelbanter.com/excel-programming/412599-how-protect-saveas-file.html)

K[_2_]

HOW TO PROTECT SAVEAS FILE
 
Hi all, I am using excel 2007. i have code (see below) in my macro
which save my file into "mht" "Single File Web Page" format.

CODE:===========================

Range("A13:L58").Select
With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
"C:\Documents and Settings\" & Range("A13").Value & " ( " &
Range("K16").Value & " )" & " - " & Range("K13").Value & ".mht", _
ActiveSheet.Name, "$A$13:$L$58", xlHtmlStatic, , "")
..Publish (False)
..AutoRepublish = False
End With
Range("B27").Select
End If
End Sub

<================================
My question is that how can i protect file sheet the one saved as in
"Single File Web Page" format so no one can make changes in it. I
know its some thing goes under ".AutoRepublish = False" but not sure.
Actually I am saving my 'Excel Macro-Enabled Workbook" format file
into "Single File Web Page" format which my other colleagues will open
in excel to view but i need some code line which should protect the
sheet of file which will be saved as "Single File Web Page" Format.
Please can any body help


All times are GMT +1. The time now is 03:37 AM.

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