Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
fodman
 
Posts: n/a
Default Macro Protection


Hi again,

i have a simple macro that clears unlocked cell contents on a
worksheet. However, as the worksheet is used by several people its
possible one of them may run the macro...unlikely but i'd rather they
didn't have the choice. Is it possible to password protect the macro or
something similar?


Thanks.


--
fodman
------------------------------------------------------------------------
fodman's Profile: http://www.excelforum.com/member.php...o&userid=31941
View this thread: http://www.excelforum.com/showthread...hreadid=555276

  #2   Report Post  
Posted to microsoft.public.excel.newusers
Norman Jones
 
Posts: n/a
Default Macro Protection

Hi Fodman,

If you preface your macro with the word Private, the macro will not show up
in the list of macros, e.g.:

Private Sub MyMacro

'Your code

End sub

Alternatvely, try something like:

'=============
Public Sub MyMacro()
Dim res As String

res = InputBox("Insert the password")

If res < "YourPassword" Then
Exit Sub
End If

'Your code

End Sub
'<<=============


---
Regards,
Norman


"fodman" wrote in
message ...

Hi again,

i have a simple macro that clears unlocked cell contents on a
worksheet. However, as the worksheet is used by several people its
possible one of them may run the macro...unlikely but i'd rather they
didn't have the choice. Is it possible to password protect the macro or
something similar?


Thanks.


--
fodman
------------------------------------------------------------------------
fodman's Profile:
http://www.excelforum.com/member.php...o&userid=31941
View this thread: http://www.excelforum.com/showthread...hreadid=555276



  #3   Report Post  
Posted to microsoft.public.excel.newusers
fodman
 
Posts: n/a
Default Macro Protection


Am i missing something?....How then do* i *find the macro if it doessn't
show up in the macro list?




--
fodman
------------------------------------------------------------------------
fodman's Profile: http://www.excelforum.com/member.php...o&userid=31941
View this thread: http://www.excelforum.com/showthread...hreadid=555276

  #4   Report Post  
Posted to microsoft.public.excel.newusers
Norman Jones
 
Posts: n/a
Default Macro Protection

Hi Fodman,

Even though the macro will not show up in the macro dialog, you can run the
macro by typing the macro's name.

However, why not try my suggested password suggestion?


---
Regards,
Norman


"fodman" wrote in
message ...

Am i missing something?....How then do* i *find the macro if it doessn't
show up in the macro list?




--
fodman
------------------------------------------------------------------------
fodman's Profile:
http://www.excelforum.com/member.php...o&userid=31941
View this thread: http://www.excelforum.com/showthread...hreadid=555276



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
workbook Protection Toggle Macro Just Learning Excel Discussion (Misc queries) 3 August 30th 05 11:03 PM
macro for protection ynissel Excel Discussion (Misc queries) 3 August 3rd 05 09:52 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


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