Hi

You can use this code on workbook open event.


'User Level 1 is admin usage
'User Level 0 is general usage

if a user logs in using level 1 he can see sheet4 for other users sheet4
will be hidden

Sub test()
If userlevel = 1 Then
    ThisWorkbook.Worksheets("Sheet4").Visible = xlVeryHidden
Else
    ThisWorkbook.Worksheets("Sheet4").Visible = True
End If
End Sub


On Tue, Jul 26, 2011 at 9:16 AM, XLS S <xlst...@gmail.com> wrote:

> Hey,
>
> Try this
>
> run this macro and put the password in vba code
>
> Sub Macro1()
>     ActiveWorkbook.Unprotect Password:="xxx"
>     Sheets("*Sheet1*").Visible = False
>     ActiveWorkbook.Protect Structure:=True, Password:="xxx"
> End Sub
>
>
>
>
> On Tue, Jul 26, 2011 at 8:44 AM, mahamadou lawali <malaw...@gmail.com>wrote:
>
>> I have a workbook with 3 sheets 2 of the sheets are for general use
>> but one
>> of the sheets i would like people to access only by a password is this
>> possible? i can protect the sheet but i would like only certain people
>> to
>> view the information? protecting stops people from amending/entering
>> data.
>>
>> --
>>
>> ----------------------------------------------------------------------------------
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
>> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link
>> http://www.facebook.com/discussexcel
>>
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
Regards

Vasant

skype Id: vasantjob
http://facebook.com/vasantjob

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to