A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Protecting Macros (Excel2000)



 
 
Thread Tools Display Modes
  #1  
Old October 9th, 2003, 10:57 AM
Ed Beattie
external usenet poster
 
Posts: n/a
Default Protecting Macros (Excel2000)

Help!!! I'm trying to incorporate a password protected
worksheet function into a macro with little or no success.

I've have quite easily incorporated a simple 'protect'
and 'unprotect' function into my workbook, however, they
need to be password protected so that when the 'unprotect'
macros is run, the user is presented with the "unprotect
workbook" password box, which has to be completed before
the macros completes its task. Currently, a "run-time
error" is presented.

The password also need to be incorporated into
the 'protect' macros so that it is automatically reset
when it is run. I've tried doing this but the password
protection part of the "protect workbook" function is
missing when I subsequently run the macro.

Is it possible or will I have to use a manul system?
  #2  
Old October 9th, 2003, 11:15 AM
Harald Staff
external usenet poster
 
Posts: n/a
Default Protecting Macros (Excel2000)

If I understand you correctly:

Sub LockThem()
Sheets(1).Protect ("Eddie")
Sheets(2).Protect ("Eagle")
ThisWorkbook.Protect ("PW")
End Sub

Sub UnlockThem()
Sheets(1).Unprotect ("Eddie")
Sheets(2).Unprotect ("Eagle")
ThisWorkbook.Unprotect ("PW")
End Sub
--
HTH. Best wishes Harald
Followup to newsgroup only please

"Ed Beattie" skrev i melding
...
Help!!! I'm trying to incorporate a password protected
worksheet function into a macro with little or no success.

I've have quite easily incorporated a simple 'protect'
and 'unprotect' function into my workbook, however, they
need to be password protected so that when the 'unprotect'
macros is run, the user is presented with the "unprotect
workbook" password box, which has to be completed before
the macros completes its task. Currently, a "run-time
error" is presented.

The password also need to be incorporated into
the 'protect' macros so that it is automatically reset
when it is run. I've tried doing this but the password
protection part of the "protect workbook" function is
missing when I subsequently run the macro.

Is it possible or will I have to use a manul system?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.