Re: $$Excel-Macros$$ Restrict access to certain sheets

2011-07-25 Thread XLS S
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 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


Re: $$Excel-Macros$$ Restrict access to certain sheets

2011-07-25 Thread Vasant
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  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 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


Re: $$Excel-Macros$$ Restrict access to certain sheets

2011-07-28 Thread mahamadou lawali

Thanks a lot for your help, but I am a beginner in VBA.So would you
guys please  break it down for me?  I've tried to paste the code and I
really don't know how to go about it.
Thanks again.
On Jul 25, 11:46 pm, XLS S  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 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 athttp://www.excel-macros.blogspot.com
> > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
> > 5. Excel Tips and Tricks athttp://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


Re: $$Excel-Macros$$ Restrict access to certain sheets

2011-07-28 Thread XLS S
Please find the link

http://www.excel-vba.com/vba-prog-1-1-editor.htm

On Fri, Jul 29, 2011 at 5:25 AM, mahamadou lawali wrote:

>
> Thanks a lot for your help, but I am a beginner in VBA.So would you
> guys please  break it down for me?  I've tried to paste the code and I
> really don't know how to go about it.
> Thanks again.
> On Jul 25, 11:46 pm, XLS S  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  >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 athttp://www.excel-macros.blogspot.com
> > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com
> > > 5. Excel Tips and Tricks athttp://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
>



-- 
.

-- 
--
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