Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Password protect Author Info in Excel Sheets (Excel 97)

    Hi,
    We are trying to password protect Author information on Excel sheets. Let us know if this is possible and how to go about it?.

    Thanx in adv.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Password protect Author Info in Excel Sheets (Excel 97)

    I do not believe that there is any way to do that.
    Legare Coleman

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Password protect Author Info in Excel Sheets (Excel 97)

    You could use the ThisWorkbook events to help . You could include some code in say the BeforeSave, BeforeClose and/or BeforePrint to set the properties to the required values, e.g. <pre>Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ThisWorkbook.BuiltinDocumentProperties("Author") _
    = "Appropriate Name"
    End Sub</pre>

    You would then have to password protect the VBA project and set it to unviewable.
    However determined users need only copy the worksheets to a new workbook to overcome that. Perhaps you could use code like the following in each worksheet object to make that more difficult.<pre>Private Sub Worksheet_Activate()
    If ThisWorkbook.FullName <> "<font color=red>Full Path & FileName</font color=red>" Then
    MsgBox "This Worksheet copied without authorisation", vbExclamation
    ThisWorkbook.Saved = True
    ThisWorkbook.Close
    End If
    End Sub</pre>

    You would have to hard cod ethe file name and path where red above. Copying the sheet to any other workbook should cause the workbook in question to be closed. Unless of course macros are disabled.

    To deal with that you could set all but one of the worksheets (say a title sheet) to xlVeryhidden, so that if macros are disable the sheets cannot be accessed in order to copy them. A workbook open event could set them visible, and use before close and/or save to rehide. That should make it inconvenient for most users.

    I think the above would be a little extreme unless you expect a determined user is going to attempt to steal your work. In which case it probably would need some additional measures.

    Andrew C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •