#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default lock for editing

please could someone help.
i have a macro which uses certain cell entries in a sheet in my workbook to
save the excel file as "psmith-chevrolet-quotenr1234-150109" for easy
identification afterwards. is it possible to add vb script that would lock
the file for editing after it has been saved the first time? the file is a
quote which is given to customers, and i want to prohibit employees from
altering another employee's quote afterwards. futhermore, is it possible to
incorporate password protection for editing?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default lock for editing

Saving the file as a PDF will provide that functionality.

des-sa wrote:

please could someone help.
i have a macro which uses certain cell entries in a sheet in my workbook to
save the excel file as "psmith-chevrolet-quotenr1234-150109" for easy
identification afterwards. is it possible to add vb script that would lock
the file for editing after it has been saved the first time? the file is a
quote which is given to customers, and i want to prohibit employees from
altering another employee's quote afterwards. futhermore, is it possible to
incorporate password protection for editing?

thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default lock for editing

thanks for reply. it would most certainly, but there are 5 interconnected
sheet, i.e. each file comprize: sheet 1= the quote, sheet 2 = the job card
(generated from the info in the quote) etc. so i need the file to keep it's
format as an excel file.
thanks

"Bob I" wrote:

Saving the file as a PDF will provide that functionality.

des-sa wrote:

please could someone help.
i have a macro which uses certain cell entries in a sheet in my workbook to
save the excel file as "psmith-chevrolet-quotenr1234-150109" for easy
identification afterwards. is it possible to add vb script that would lock
the file for editing after it has been saved the first time? the file is a
quote which is given to customers, and i want to prohibit employees from
altering another employee's quote afterwards. futhermore, is it possible to
incorporate password protection for editing?

thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default lock for editing

ActiveWorkbook.SaveAs Filename:= _
"C:\yourpath\yourname" & ".xls", FileFormat:=xlNormal _
, Password:="", WriteResPassword:="yourpword", _
ReadOnlyRecommended:=True

Note: user can always save as not read-only under a new name then delete
your copy and re-name theirs as original after making changes.


Gord Dibben MS Excel MVP


On Thu, 15 Jan 2009 10:11:01 -0800, des-sa
wrote:

please could someone help.
i have a macro which uses certain cell entries in a sheet in my workbook to
save the excel file as "psmith-chevrolet-quotenr1234-150109" for easy
identification afterwards. is it possible to add vb script that would lock
the file for editing after it has been saved the first time? the file is a
quote which is given to customers, and i want to prohibit employees from
altering another employee's quote afterwards. futhermore, is it possible to
incorporate password protection for editing?

thanks


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
lock for editing des-sa[_2_] Excel Discussion (Misc queries) 0 January 15th 09 06:01 PM
how do I undo the scroll lock, thscroll lock button does not work scroll lock Excel Discussion (Misc queries) 3 July 19th 08 10:17 PM
I have lock a wookbook but one cell does not want to lock it Mimi Excel Discussion (Misc queries) 2 January 21st 07 10:59 PM
I have lock a wookbook but one cell does not want to lock it Mimi Excel Discussion (Misc queries) 1 January 21st 07 09:44 AM
How do I lock some fields but allow editing for others in excel S.Sharif Excel Discussion (Misc queries) 1 December 13th 05 02:58 AM


All times are GMT +1. The time now is 04:03 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"