Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Password protect macro via a macro

I know you can protect a macro by selecting Tools-VBAProject
Properties-Protection in VBA but you have to do this manually. Is it
possible to password protect a macro by running another macro?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Password protect macro via a macro

You could just ask for a password right at the top:

Option Explicit
sub testme
dim myPwd as string
dim pwd as string

myPwd = "topSeCrEt"

pwd = inputbox(prompt:="What's the frequency, Kenneth?")

if pwd < mypwd then
beep
exit sub
end if

'rest of code
end sub

mcphc wrote:

I know you can protect a macro by selecting Tools-VBAProject
Properties-Protection in VBA but you have to do this manually. Is it
possible to password protect a macro by running another macro?


--

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
Password Protect Macro Dan Excel Programming 2 September 1st 06 07:13 PM
password protect macro Modell Excel Programming 3 April 27th 06 08:59 PM
Password Protect Macro? ryanmhess Excel Programming 4 January 27th 06 04:56 PM
Password Protect Running of Macro John Excel Programming 8 September 27th 05 02:49 AM
Password protect macro Pete Excel Programming 2 April 16th 04 03:44 AM


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"