View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Protecting Sheet with Password

If you're the one applying the password and writing the code, then you should be
able do your stuff and protect the worksheet.

dim wks1 as worksheet
dim wks2 as worksheet

set wks1 = worksheets("sheet1")
set wks2 = worksheets("sheet2")

wks1.range("a1:b9").copy _
destination:=wks2.range("a1")

wks2.protect password:="hi"

I guess you didn't even need to unprotect your original worksheet to copy the
data.

(I misunderstood that portion of your question.)





"halem2 <" wrote:

the spreadsheet will be used by 15 different users in 15 different
geographical locations. I'm trying to avoid having any of them change
the sheet. I am the one passwording the sheet.

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


--

Dave Peterson