Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Use macro to password protect macros

I have a macro that saves my spreadsheet (let call it "Spreadsheet_A") as a
spreadsheet with a different name (ie. "Spreadsheet_A_10_30_2005") but the
same password to open the file.

Other users cannot open Spreadsheet_A_10_30_2005 without my password (and I
do not believe that they have the sophistication to download a program to
remove the password protection). However, they are currently able to view my
macros, which contain the password. I know that I can password protect my
macros by going to Tools-VBA Project Properties, but is there a way to write
a macro to automatically password protect my macros upon exit? Or upon using
"save as"?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Use macro to password protect macros

One more thing...I keep Spreadsheet_A on my C drive (where no one else can
access it) and I am frequently editing my macros (so I would prefer not to
always require a password to view the macros). Spreadsheet_A_10_30_2005,
however, is saved to our shared drive, which is why I want to use a macro to
password protect my macros. Thanks,
Noah

"Noah" wrote:

I have a macro that saves my spreadsheet (let call it "Spreadsheet_A") as a
spreadsheet with a different name (ie. "Spreadsheet_A_10_30_2005") but the
same password to open the file.

Other users cannot open Spreadsheet_A_10_30_2005 without my password (and I
do not believe that they have the sophistication to download a program to
remove the password protection). However, they are currently able to view my
macros, which contain the password. I know that I can password protect my
macros by going to Tools-VBA Project Properties, but is there a way to write
a macro to automatically password protect my macros upon exit? Or upon using
"save as"?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Use macro to password protect macros

There is no provision for it in the Object model.

The usual suggestion is to use SendKeys

See Bill Manville's code:

http://tinyurl.com/926n9

--
Regards,
Tom Ogilvy


"Noah" wrote in message
...
One more thing...I keep Spreadsheet_A on my C drive (where no one else can
access it) and I am frequently editing my macros (so I would prefer not to
always require a password to view the macros). Spreadsheet_A_10_30_2005,
however, is saved to our shared drive, which is why I want to use a macro

to
password protect my macros. Thanks,
Noah

"Noah" wrote:

I have a macro that saves my spreadsheet (let call it "Spreadsheet_A")

as a
spreadsheet with a different name (ie. "Spreadsheet_A_10_30_2005") but

the
same password to open the file.

Other users cannot open Spreadsheet_A_10_30_2005 without my password

(and I
do not believe that they have the sophistication to download a program

to
remove the password protection). However, they are currently able to

view my
macros, which contain the password. I know that I can password protect

my
macros by going to Tools-VBA Project Properties, but is there a way to

write
a macro to automatically password protect my macros upon exit? Or upon

using
"save as"?

Thanks!



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
Password protect macros in Excel Greg Sottile Excel Discussion (Misc queries) 5 December 15th 09 01:23 PM
Password protect a sheet without Macros Cappa Excel Discussion (Misc queries) 3 May 27th 06 01:49 AM
Password Protect Macro? ryanmhess Excel Programming 4 January 27th 06 04:56 PM
Can I password protect Excel VBA / Macros? Mike Excel Programming 3 January 12th 05 02:13 PM
Password protect macro Pete Excel Programming 2 April 16th 04 03:44 AM


All times are GMT +1. The time now is 04:14 AM.

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"