Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Protecting an entire workbook

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
bookername(brancher).Activat
ActiveWorkbook.Protect password:="millertime
ActiveWorkbook.Sav
ActiveWorkbook.Clos
Next branche

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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!



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
Protecting a workbook Sasikiran Excel Discussion (Misc queries) 1 March 6th 08 10:05 PM
Protecting a workbook Oldjay Excel Discussion (Misc queries) 1 February 24th 08 08:40 PM
Protecting Entire Workbook from Deletion Missy43 Excel Discussion (Misc queries) 2 July 7th 07 12:14 PM
Protecting Workbook!.. Neo1 Excel Worksheet Functions 3 May 3rd 06 01:22 PM
Protecting Workbook Paul Cooling Excel Discussion (Misc queries) 2 March 7th 05 11:55 AM


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