close

I have a shared workbook which is used by several people. I would like to
prevent one particular username (the one set it Excel properties) from
accessing the workbook.

Any help with this would be appreciated.

Not resilient, but maybe good enough

'-----------------------------------------------------------------
Private Sub Workbook_Open()
'-----------------------------------------------------------------
If Application.UserName = quot;Joequot; Then
Me.Close False
End If
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;Martin Whiteheadquot; gt; wrote in message
...
gt; I have a shared workbook which is used by several people. I would like to
gt; prevent one particular username (the one set it Excel properties) from
gt; accessing the workbook.
gt;
gt; Any help with this would be appreciated.
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()