View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Protecting an entire workbook

Protecting a workbook is *not* the same as protecting all the worksheets.
Look at Help to understand the differences.

--

Vasant

"dumbass" wrote in message
...
Hi-

I wrote a macro that saves a worksheet by state into a file for each

branch; however, I would like to protect the entire workbook being saved
before saving. I tried:

For brancher = 1 To 8
bookername(brancher).Activate
ActiveWorkbook.Protect password:="millertime"
ActiveWorkbook.Save
ActiveWorkbook.Close
Next brancher

When the code executes, I do not get an error, but when I open that file

open, there is no protection.

Thanks for the help!