Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2000: Sending Password protection to new book

Status
Not open for further replies.

kadam

IS-IT--Management
Nov 15, 2000
14
CA
Hi - I have a workbook ("Template") which creates quotes in a separate workbook ("Quote"). The Quote workbook is created new every time - I built it this way so that customers wouldn't receive quotes with macros attached.

I've been able to lock the Quote workbook, but have not been able to get it to password protect. All I currently use is...

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

Remember - all the macros are in Template, and its the Quote workbook that needs to be fully locked down.

Ideas? I'm at my limit of macro knowledge here...

Many thanks - Kadam.
 
protect takes a password for it's first paramater. Is there a reason you are not using this?

-Venkman
 
I now think I can do it with SendKeys...

Application.SendKeys ("%T")
Application.SendKeys ("P")
Application.SendKeys ("P")
Application.SendKeys ("abc~")
Application.SendKeys ("abc~")
 
Thanks Venkman - didn't know it existed... easier than SendKeys...

 
you should use the visual basic help. It's a little more difficult than I would like to find the topic you are looking for, but once you find the right topic, it's great at answering these type of questions.

-Venkman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top