Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CH CH is offline
external usenet poster
 
Posts: 3
Default Macro to lock project from viewing

I'm looking for a macro to insert into my project to automatically
password protect and lock a project from viewing instead of manually
doing the following:

--Going into the VBA Project (view code)
--Tools
--VBA Project Properties
-- Protection Tab
--Lock Project for Viewing


Can anyone help with this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro to lock project from viewing

There's no property/object in excel that allows you to do this mechanically.

About the best you can do is use SendKeys to show the dialog and choose the
options you want.

But I wouldn't depend on this working.

CH wrote:

I'm looking for a macro to insert into my project to automatically
password protect and lock a project from viewing instead of manually
doing the following:

--Going into the VBA Project (view code)
--Tools
--VBA Project Properties
-- Protection Tab
--Lock Project for Viewing

Can anyone help with this?


--

Dave Peterson
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
Excel 2007 - Lock for viewing Ed Excel Discussion (Misc queries) 0 January 16th 07 11:35 PM
Lock VBProject for Viewing using Code Nessy via OfficeKB.com Excel Programming 1 October 2nd 06 08:58 PM
Lock Project for Viewing..HELP ME And1 Excel Programming 0 November 26th 05 08:22 PM
Protecting a VBA Project from viewing William Benson[_3_] Excel Programming 9 November 10th 05 03:34 AM
Locking and unlocking a Excel project for viewing VJ Excel Programming 3 April 7th 05 09:33 PM


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