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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|